So what is React?
How does React Work?
To put it shortly, there normally is a Root component as well as child components, which are built by using a Class component or a Functional component (the differences between the two are out of scope for this blog; however, there are many resources online that can explain them well! For the purposes of understanding, I will talking about the class component). Below is an example of how components would be segmented.
Looking at the example above, the yellow outer box would represent the Root component and all the components inside would be child components of that Root component.
That is exactly why this library is called React. Because when a state changes, React "reacts" to the stage changes and updates the DOM!