This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is the simplest Flux flow: | |
1. Stores subscribe to a subset of actions. | |
2. An action is sent to the dispatcher. | |
3. The dispatcher notifies subscribed stores of the action. | |
4. Stores update their state based on the action. | |
5. The view updates according to the new state in the stores. 6. The next action can then be processed. | |
Redux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Defination - | |
A pure function returns values by using only its arguments. It will not use any additional data nor it changes any data structures, touches no storage, and emits no external events (like network calls). | |
*/ | |
function sum(a,b) { | |
return a + b; | |
} | |
arr.map((item) => item.id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.Create a github repo(It using github for free, then create a public repo). | |
2.Create a "gh-pages" branch | |
3.Clone it on local machine. | |
4.checkout to gh-pages branch | |
5.`npm init -y` in that local repo | |
6.`npm install --save-dev parcel-bundler` install parcel as dev dependency. | |
7. Add .html, .css and .js files. | |
8. Lets add npm script for bundling with parcel js. | |
9. `"start": "parcel src/index.html"` | |
Now we want to push code in github pages |