Introduction
React 18 is the newswest buzzword in the community of JavaScript developers. Used for building UI components, React 18 was released in March 2022. This latest version React 18 primarily focuses on improving the performance and updating the rendering engine. In June 2021, the React team announced the upcoming launch of React 18 and what was to come. In December 2021, the prime focus of React Conf 2021 was the newly launched concurrent rendering features of React.
It introduces many under-the-hood new features and some out-of-the-box performance improvements. So let’s explore all of it.
In React 18, we have two root APIs.
1) Legacy root AP: This API is called with ReactDOM.render.
2) New root API:- This API is called with ReactDOM.createRoot. After running this API we can add all the new features of React 18 to our project. We have to import it from React-dom/client.