1 Matching Annotations
- May 2017
-
www.hackingwithreact.com www.hackingwithreact.com
-
<Route path="/" component={ List } /> <Route path="/react" component={ Detail } />
Note, in newer versions of the router, this won't work because a route can only contain one child. Try wrapping the two routes in a <switch>:</switch>
<Switch> <Route exact path="/" component={ List } /> <Route path="/react" component={Detail} /> </Switch>
-