score:0

{user.authenticated && <Redirect to={nextPath} />}

score:1

import {BrowserRouter, Route} from 'react-router-dom';
const createRoutes = (store, history) => {
  return (
    <BrowserRouter>
      <div>
        <AppLayout/>
        <Route exact path="/" component={Home}/>
        <Route path="/login" component={LoginContainer}/>
        <Route path="/register" component={RegisterContainer}/>
      </div>
    <BrowserRouter>
  );
};

export default createRoutes;

Related Query

More Query from same tag