I am currently working on html markup in react
environment.
What I'm curious about is, my code looks like this.
<body>
<div id="root">
<div>
<Header>
<Section>
<Footer>
</div>
</div>
</body>
It is impossible to have header and section inside a div tag.
So I changed body id="root"
but it gives me an error.
Is there no way to change div id="root"
div
to body
?
index.tsx
ReactDOM.render(
<BrowserRouter>
<App />
</BrowserRouter>,
document.getElementById('root')
);