ReactJS : ReactJS is an open-source, component-based front-end library which is used only for building the user interfaces. React is flexible and declarative JavaScript Library. Due to slow speed of DOM ( Document Object Model ), React implements a Virtual DOM that is basically an abstraction of DOM. ReactJS also gives us a provision to write the JavaScript and HTML together.

Babel : Babel is a JavaScript compiler that transform the latest JavaScript features, which are not understandable to every browser, into a backward compatible version of JavaScript in current and older browsers or environments.

JSX : JSX is a syntactical extension to JavaScript. It comes with the full power of JavaScript. JSX produces React elements and can embed any JavaScript expression. Ultimately, the JSX is converted to JavaScript using compiler/transformers.


Setting up React and Babel

Get the React and ReactDOM scripts, place it with other scripts and remember to include it every time you use React or ReactDOM.

Now for Babel, create a folder structure say C:\react\work and move to it. We will now install the transpiler for working with Babel. Run the following commands :

npm install babel-cli

npm install babel-preset-react
npm install babel-plugin-transform-react-jsx

#reactjs #babel #html #jsx #javascript #programming

ReactJS | Understanding Babel and JSX
1.20 GEEK