Introduction To react JS
React​
React is a JavaScript frontend library for building user interfaces. It is maintained by Facebook and a community of individual developers and companies. You can use React to make single-page websites or mobile apps, which can be pretty cool!
What React Does​
It's a JavaScript Library : React is not a framework; it's a library. Think of it as a collection of useful code that you can use to build your UI.
Developed by Facebook (Meta): Yep, smart folks at Facebook created React and continue to improve it.
Component-Based Development: React is all about building reusable building blocks called components. You make a component once, and then you can use it in many different places on your website or app. This saves you time and keeps your code neat and organized.
Micro Frontend: React can be used to build small parts of a website. So, if you have a big site, you can use React for just one part, like a cool interactive widget, without changing the whole site.
Awesome Features of React​
Fast: React is speedy. It helps your web pages load quickly and run smoothly.
Hot Module Reloading (HMR): This is like magic for developers. It lets you see your code changes right away without refreshing your whole page. It's like having an instant preview of your work.
Virtual DOM: The Virtual DOM is a lightweight, in-memory representation of the actual DOM. It's essentially a copy of the real DOM, but it's not directly tied to the browser's rendering engine. Developers use frameworks like React to work with the Virtual DOM.
JSX : JSX stands for JavaScript XML. It's a syntax extension for JavaScript used in React to describe the structure and layout of user interfaces. JSX allows developers to write
HTML-like syntax which allows to write Js & Html at one place
. making it easier to define and render UI components in React applications.
Some Handy Terms​
npm
(Node Package Manager): npm
is like a super cool store for JavaScript code. You can find and install all sorts of helpful code packages there.
npx
(Node Package Executer): npx
is like a magical button that runs code packages from npm
without installing them permanently. It's handy for running one-time commands.