Next.js Discord

Discord Forum

How do I pass down object properties to the the component I am navigating to?

Unanswered
Abyssinian posted this in #help-forum
Open in Discord
AbyssinianOP
In apps/pages I would do the following:

router.push({
  pathname: '/training',
  query: { routeToPage: tile?.routeToPage }
})


But I now see in app/router navigation that router.push only takes a string like this: router.push('/training').

Can anyone link me to an example where I can pass down an object to the component I am navigating to without passing it down to the component directly as some would have to nest significantly.

Let me know if I can clarify in any way thank you!

0 Replies