LoginSign Up

Create a Modal Route with Link and Nav State in React Router

In this lesson we'll show how the Link component to prop can receive an object. This allows us to pass state to the route. With the nav state we destructure off of location we can determine if a user wants to open a modal or on a cold visit show an image embedded in the page.

Get the Code

Liked this content?

Get notified more about React Router!

No Spam! We Promise!