So with my site “analyze.neiki.dev” which is made with React 18 (^18.2.0) i have an error on the
Waybackmachine. (https://web.archive.org/save)
If i save my website with React 18 and this Render method:
ReactDOM.createRoot(document.getElementById('root')!).render(
<AppRoutes />
)
It will just display a blank page on the web archive after the save.
Example: https://web.archive.org/web/20240505100602/https://analyze.neiki.dev/
Now i tried anything to fix this, i came across some issue that mentioned React 18 as version.
Now i changed my render method to:
const root = document.getElementById('root');
ReactDOM.render(<AppRoutes />, root);
This method is deprecated in React 18, so if i still use that it will make my page use React 17 instead.
After i changed it to this and redeployed my page, now the web archive works just fine for me and displays all, load anything.
So how can i fix this? I dont want to use deprecated methods to render my app and force downgrade to React 17 instead of using up to date React 18.2.
Anything i can change.
I noticed on other React Apps / Websites, it works fine on them (not mine so i cant check their React Version) but im pretty sure they are not using React 17.
Any fix for this?
I tried to change the render method and Routing but nothing helped, it only worked changing the version of React from 18 to 17 and used the deprecated render method of React 17.
Neiki Analytics is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.