I have the following Router definition:
<Router>
<Route exact path='/' component={Home}/>
<Route path='/about' component={About}/>
<Route path='/code' component={Code}/>
</Router>
I want any unmapped route (i.e /foo) to redirect back to root /.
I tried <Redirect .../> without success. Also adding a <Route /> without a path= resulted in a duplicated component on each page.