Closed chenfengyanyu closed 6 years ago
I use react-router, but can't refresh.otherwise,it failed to compile.Here is my code:
<Router> <Switch> <Route path="/" exact component={Upload} /> <Route path="/list" component={ListPage} /> <Redirect to="/" /> </Switch> </Router>
Did anyone know what had happened? And what should I do?
@chenfengyanyu You have to use the memory router or the hash router, otherwise you will be navigating around on the file:// protocol.
file://
@MarshallOfSound You are right, thank you very much!
I use react-router, but can't refresh.otherwise,it failed to compile.Here is my code:
Did anyone know what had happened? And what should I do?