1.react JS Basics
1.react JS Basics
React Introduction:
★ In the React application, there are several files and folders in the root
directory.
● node_modules: It contains the React library and any other
third party libraries needed.
● public: It holds the public assets of the application. It
contains the index.html where React will mount the
application by default on the <div id="root"></div> element.
● src: It contains the App.css, App.js, App.test.js, index.css,
index.js, and serviceWorker.js files. Here, the App.js file is
always responsible for displaying the output screen in
React.
● package-lock.json: It is generated automatically for any
operations where the npm package modifies either the
node_modules tree or package.json.
● package.json: It holds various metadata required for the
project. It gives information to npm, which allows it to
identify the project as well as handle the project
dependencies.
● README.md: It provides the documentation to read about
React topics.
React Features:
● JSX
● Components
● One-way Data Binding
● Virtual DOM
● Simplicity
● Performance
Components:
Virtual DOM:
JSX: