T
TanStack2y ago
ambitious-aqua

hiii want to know how can i get the the state which we pass in the navigate({to: url , state :{x})

how can useLocation this to get the state which i have pass in the useNavigate
1 Reply
environmental-rose
environmental-rose2y ago
Generally, the easiest way to get access to the current route is:
const location = useRouterState({ select: s => s.location })
const location = useRouterState({ select: s => s.location })

Did you find this page helpful?