Please enable JavaScript.
Coggle requires JavaScript to display documents.
React - Coggle Diagram
React
-
-
- npm i create-react-app - Not necessary
- npx create-react-app myapp
-
-
-
Babel
- Converts ES 15/16/17/18/19 to ES5 code which is supported by all browsers.
If we don't have JSX, we'll have to write complete JS which would be eventually very complicated. JSX is not cumpolsary to be used.
-
-
-
-
JSX (JavaScript + XML) is an extension of JavaScript that allows you to write HTML directly within JavaScript, which has a few benefits of making your code more readable and exercising the full power of JavaScript within HTML.
-
JSX never gets converted to HTML. Instead DOM is rendered based on JS code generated & actual DOM elements are generated as written by us in JSX
JSX vs HTML
-
-
-
These 3 are imp differences. There are few others as well but won't crash your app. Eg: for is a js keyword. so in label we use htmlFor . Check console errors to figure out this.
-
-
-
-
-