Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

push a new route only triggers URL change but not location change

<ConnectedRouter history={history}>
    <BrowserRouter>
      <Switch>
        <PrivateRouter exact path="/" component={App} />
        <Route exact path="/login" component={Login} />
        <Route component={NotFound} />
     </Switch>
   <BrowserRouter>
</ConnectedRouter>
 
PREVIOUS NEXT
Tagged: #push #route #triggers #URL #change #location #change
ADD COMMENT
Topic
Name
4+1 =