Going to a route via url shows content briefly, auths then shows nothing (e.g. localhost:8080/home)

Simply added this code before returning my <BrowserRouter> component in the App/Root component:

if (loading) { return <div>Loading</div>; }
Essentially, I didn’t want to run any kind of code relating to the PrivateRouter, until Auth0 had finished loading.

This problem is solved now. Also I found that code on: https://github.com/auth0-samples/auth0-react-samples/blob/master/01-Login/src/App.js

1 Like