I created a React app and it ran perfectly fine with simple HTML/CSS a header and a button. But when I added <Routes>, <Route> and navigation.navigate, I get a blank screen with no errors in the console that I used to run the app. However, there is an error in the browser console, stating "Cannot read property of undefined 'getElementById".
I have tried giving the main parent div id='root' as that is the variable that was passed to getElementById. I am not sure what other solutions to try as other questions have had different situations/contexts.
Are you trying to navigate to a different page?
If so try using react-router-dom
Here's the link to the documentation https://github.com/remix-run/react-router/blob/main/docs/getting-started/tutorial.md