Question · JavaScript and React course · Module 6: React Router
Location state in React Router
How can you pass data to the next page using the Link component?
Answer options
- Through the data attribute on the Link component
- Through the state prop on the Link component
- Through URL parameters as a query string
- Through the global window.state object
You can check the correct answer by solving this task in the CodeWorlds game.