Now, we just need a way to get back to the main page from a single post page. We are going to repeat a similar process to what we have done previously. Let's define the links back to the main page now:
- Edit src/pages/PostPage.js, and import the Link component there:
import { Link } from 'react-navi'
- Then, insert a new link back to the main page, before displaying the post:
return ( <div> <div><Link href="/">Go back</Link></div>
- After going to a page, we can now use the Go back link in order to return to the main page:
Now, our app also provides a way back ...