- How the browser renders the document
- Receives the data (bytes) from the server.
- Parses and converts into tokens (<, TagName, Attribute, AttributeValue, >).
- Turns tokens into nodes.
- Turns nodes into the
DOM
tree.
- Builds
CSSOM
tree from thecss rules
.
import axios from 'axios' | |
import toast from './toast' | |
function errorResponseHandler(error) { | |
// check for errorHandle config | |
if( error.config.hasOwnProperty('errorHandle') && error.config.errorHandle === false ) { | |
return Promise.reject(error); | |
} | |
// if has response show the error |
If you use Storybook with Next.js and have components using next/link
you'll have to mock next/router
the same you would for testing with Jest or others. Simply create a file with the mock router as shown below and import it in your Storybook config.
This is based on some information from an issue on Next.js:
// https://medium.com/@bdc/web-components-the-react-way-8ed5b6f4f942 | |
const store = (() => { | |
let state; | |
return todos => { | |
if (todos) { | |
state = todos; | |
render("todo-list"); | |
} | |
return state; | |
}; |
# http://webapps.stackexchange.com/questions/39587/view-estimated-size-of-github-repository-before-cloning | |
# tested on macOS | |
echo https://github.com/torvalds/linux.git | perl -ne 'print $1 if m!([^/]+/[^/]+?)(?:\.git)?$!' | xargs -I{} curl -s -k https://api.github.com/repos/'{}' | grep size | |
# output: | |
# "size": 1746294, |
AWS ํ์ต ๋งํฌ์ง ์๋ฆฌ์ฆ
- AWS ํ์ต ์๋ฃ์ง http://bit.ly/aws-study-resource
- AWS ๊ณต์ธ ์๋ฃจ์ ์ค ์ํคํ ํธ - ์ด์์์์ดํธ ์ํ ๊ฐ์ด๋ http://bit.ly/sacertguide
- AWS ๊ณต์ธ ๊ฐ๋ฐ์ - ์ด์์์์ดํธ ์ํ ๊ฐ์ด๋ http://bit.ly/devcertguide
- AWS ๋ณด์ ๊ด๋ จ ์ปจํ ์ธ ๋ชจ์์ง http://bit.ly/seccontents
AWS ๊ณต์ธ ๊ฐ๋ฐ์ - ์ด์์์์ดํธ ์ํ ๊ฐ์ด๋(http://bit.ly/devcertguide)
// connect() is a function that injects Redux-related props into your component. | |
// You can inject data and callbacks that change that data by dispatching actions. | |
function connect(mapStateToProps, mapDispatchToProps) { | |
// It lets us inject component as the last step so people can use it as a decorator. | |
// Generally you don't need to worry about it. | |
return function (WrappedComponent) { | |
// It returns a component | |
return class extends React.Component { | |
render() { | |
return ( |
Nix can be used to build any kind of package. But here I'm just going to focus on the simple C&C++ case.
Firstly we have to know that the final built packages will located inside /nix/store
. Which is globally readable directory of all build inputs and build outputs of the Nix system. The emphasis is on readable, not writable, that is /nix/store
is meant to be modified by the user or programs except for the Nix system utilities. This centralises the management of packages, and keeps our packages and package configuration consistent.
So what exactly are we trying to build. Our goal is to build a directory that will be located in /nix/store/*-package-version/
, where *
is the hash of the package. Preferably a version
is also available, but some C&C++ packages don't have versions, so in that case, there's only /nix/store/*-package/
.
What will be inside this directory? It follows the GNU Coding Standards descri
A quick guide on how to setup Node.js development environment.
nvm allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help.
- Open new Terminal window.