December 2019
Intermediate to advanced
474 pages
10h 3m
English
Being able to navigate to individual questions is only one piece of the cake when you want to add routing a project, and pagination could be another one. For this, it would be a good idea to move the overview of all of the questions to another route that is called /questions. To do this, you need to add another Route that refers to the Feed component within Router in your App component:
...class App extends Component { render() { return ( <> <GlobalStyle /> <AppWrapper> <Header /> <Router> <Route exact path='/' component={Feed} />+ <Route path='/questions' component={Feed} /> <Route path='/questions/:id' component={Question} /> </Router> </AppWrapper> </> ); } } export default App;
However, if you now visit the project ...