3 React
3 React
3 Reference Cheatsheet
npm init # create a package.json // Create a state value that is initially set to 0. The
npm install package-name # install package // value is stored in ‘count‘ and updated with ‘setCount‘
# & add --save to also add in package.json const [count, setCount] = useState(0)
npm install --save package-name
npm install # Install all req’s in package.json // Adds one to ‘count‘ and then re-renders the component
node file.js # Run a given file with node setCount(count + 1)