This file contains hidden or 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
npm install express-generator -g | |
express --view=pug myApp |
This file contains hidden or 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
//Parent component | |
class Parent extends React.Component { | |
render() { | |
return ( | |
<Child example="foo" /> | |
) | |
} | |
} |
This file contains hidden or 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
## commands from terminal | |
mkdir my-app | |
cd my-app | |
npm init -y -- creates package.json file with default configurations | |
npm install react react-dom -- install react and react-dom dependencies | |
vim .gitignore -- creates gitigonre file | |
mkdir app --create app folder in your project folder | |
cd app | |
touch index.js index.css -- creates two files in app directory | |
npm install --save-dev @babel/core @babel/preset-env @babel/preset-react webpack webpack-cli webpack-dev-server babel-loader css-loader style-loader html-webpack-plugin -- adding all require depnendincies to the project |
This file contains hidden or 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
function onSuccess(){ | |
console.log('Success ✌️') | |
} | |
function onError(){ | |
console.log('Error 💩') | |
} | |
var promise = new Promise((resolve, reject)=>{ | |
resolve(); // will execute the On success method |
This file contains hidden or 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
Show hidden characters
{ | |
"presets": [ | |
"env" | |
] | |
} |
This file contains hidden or 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
@function pxToVw($px, $viewport) { | |
@return ($px * 100vw / $viewport); | |
} |
This file contains hidden or 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
Create an empty folder -- mkdir jamstack-registration-form | |
set jamstack app -- yarn init -y | |
create a folder -- mkdir src | |
create a html file -- index.html | |
creating a nee package with yarn -- yarn init -y | |
To server your application in real time -- npx serve FOLDER_NAME | |
To deploy site on netlify -- netlify init |