React is used to build single-page applications or mobile applications. You can create complex user interfaces using small isolated pieces of code called components.
Components in React
Props and State
There are two types of "modal" data in React:
- props and,
When the state or props of a component change, react renders the component using new data(props and state). However, react does not work on the DOM directly. Instead, it creates a virtual DOM in the memory and compares it with the original DOM. If there is a difference, react updates the real DOM to sync with the virtual DOM.
React updates only the part of DOM which is modified instead of rendering the whole page again.
In the next article, we will discuss some of the core features of React JS.
If you liked this article, please upvote and recommend it. Feel free to ask any questions in the comments below.