I'm using react-snap to pre-generate my website content instead of client side rendering.
After building the project, when I manually edit index.html, the changes only get applied if the edited elements are outside <div id="root"/>.
I can add scripts and meta tags to the <head/> or to the bottom of <body/>; but nothing happens when I edit the content of <div id="root"/>. When I inspect the site the contents have not changed but the code inside html file is different.
What is causing this behavior and how can I bypass it?
Why do you need to edit
index.html? By default,create-react-appusesindex.htmlas a fallback.Make sure you're not using self-closing tags like this:
<div id="root"/>and replace with this:
<div id="root"> </div>