Skip to content

Instantly share code, notes, and snippets.

View poonia's full-sized avatar
🐼
Focusing

Praveen Poonia poonia

🐼
Focusing
View GitHub Profile
@poonia
poonia / Redux
Last active March 18, 2019 05:16
Redux
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
@poonia
poonia / pureFunctionGist.js
Last active January 10, 2019 10:52
Pure Function
/*
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);
@poonia
poonia / gh-pages_and_parceljs
Created March 19, 2019 08:57
gh-pages with parceljs
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
@poonia
poonia / AEM-dialog-field-types.xml
Last active December 31, 2023 22:52
AEM Author Dialog Field Types and Examples
We couldn’t find that file to show.