React JS Cheat Sheet, A-Z Topics
Welcome to this ReactJS Cheat Sheet. I have covered all the important react topics and arranged them into 45 important points.
Let's start with basic things related to React:
Babel:
Babel is a transpiler, that transforms your (JSX to JS) modern JavaScript code into the older version, and then adds polyfills, a piece of code that implements features missing in the browser but needed by your app.
You can set up your own babel configuration using Webpack as I show in this article. Or you can use create-react-app which internally uses Babel for the JSX to JavaScript conversion.
Webpack
Webpack is a module bundler for JavaScript that puts everything needed by your application together. This library can also run tasks like running Babel, Jest, ESLint, and PostCSS on top of your code.
undefined
, null
, and boolean
are not displayed on the UI when used inside JSX.
What react-scripts do
react-scripts are simply scripts to run the build tools required to transform React JSX syntax into plain JavaScript programmatically. package.json file of react-script contains all dependencies like Babel and webpack.