score:3

Accepted answer
<Route exact path="/" component={Dashboard} key={1} />;         

score:0

<Switch>
    <Route exact to="/" component={Dashboard} key={1} />;         
    <Route exact to="/icons" component={Icons} key={2} />;  
    <Route to="/icons/:iconId" component={IconDetails} key={3} />;       
</Switch>

score:2

export default function App() {
      return (
            <Switch>
              <Route to="/icons" component={Icons} key={2} />
              <Route to="/" component={Dashboard} key={1} />              
           </Switch>
      );
    }

Related Query

More Query from same tag