reactjs electronjs blank screen on protected route

Solutions on MaxInterview for reactjs electronjs blank screen on protected route by the best coders in the world

showing results for - "reactjs electronjs blank screen on protected route"
Valentino
03 May 2018
1Do not ask me why, but all you need to do is: 
2replace Router or BrowserRouter with HashRouter
3
4example:
5return (
6    <HashRouter>
7        <div>
8        <Header/>
9            <Switch>
10             <Route path="/" component={Home} exact/>
11             <Route path="/news" component={News} exact/>
12             <Route path="/store" component={Store} exact/>
13             <Route path="/login" component={Login} exact/>
14             <ProtectedRoute path="/profile" component={Profile} exact/>
15           </Switch>
16        </div> 
17      </HashRouter>
18  )