Why for whatever frameworks we use in JS, we must have an "entry point" in which our components live
Hello, whether it's in
react or vue, I noticed that each time, we start by creating a "root" where our component will be mounted. Is it because we need to explicitly tell react/vue where to start so that they have an idea of what their virtual DOM will be when inserting new components? Else, they won't have any idea of the hierarchy of the components or where they live?2 Replies
yup
It isn't commonly done, but you are allowed to have a web app that isn't 100% React. You could put your React only in part of the page. If you choose to do that, there is no way for the React system to decide by itself where it should go, so you have to tell it.