score:3

Accepted answer
<Switch>
  {["/", "/login"].map(path => (
    <Route
      key={path}
      exact
      path={path}
      render={() => <Login login={true} />}
    />
  ))}
  <Redirect to="/" />
</Switch>

score:3

<Route path="/(home|users|contact)/" component={Home} />

Related Query

More Query from same tag