React Router Dom

I have a welcome Page and I want to navigate to the homepage on click of a button and I know I’m going to need the react-router-dom to execute this action but I’ve tried different methods and it still doesn’t work.
Here’s the code sandbox link to what I’ve tried:
I want to link the GamePage Page to the get started button, a very basic router for now

Thank you for your help in advance

You’re going to need to use the Link component provided by react-router-dom - <Link to="/games">........</Link>. It hooks into the router, so you give it the path you want to go to (one of the ones defined as a <Route>), and it does it’s stuff.

1 Like