React JS is one of the most (if not the most) popular buzzword in the frontend development world today. With major companies and many startups using react in their products, it’s demand has risen many folds amongst developers and job seekers. Here are some of the facts about React a beginner show know when they decide to learn React JS.
2. React JS is a Library not a framework
2. React JS libraries are imported as 2 files one as React.js and other as React-DOM.js
As React is used across platforms for development like React Native for mobile devices, React3d for rendering etc., the React.js file provides common functionalities across these platforms. While, as the name suggests, React-DOM.js file provides functionalities exclusively for the web browser like providing console tools, render tools etc.
5. We create a root using ReactDOM.createRoot() method
6. We can have multiple roots.
But, even in large projects there is usually no need of more than one roots. So, almost every time you shall encounter single root per project, where we inject React using .render() method.
7. React root can only contain rendered content
It is a common practice to write “Not Rendered” within the root, so as to know about problem with rendering on final screen during development.