In version 5, I used to do this:
<NavLink
key={"myRoute"}
to={{
pathname: "myRoute",
state: {myState: "myStateValue"},
}}
className="nav-card"
>
then receive props with useLocation
location.state
But what happened when I upgraded to version 6 is that location.state
is null