Skip to content

[Docs]: Example of defining own useRouter hook #1447

Answered by amannn
MichalMoravik asked this question in Q&A
Discussion options

You must be logged in to vote

If you upgrade to createNavigation in next-intl@^3.22, the types are a bit simplified—that should help with composition (see e.g. the updated link composition example).

You should be able to call Parameters<(typeof router)['push']> for example to extract the arguments.

I'll move this to a discussion since it seems to be more of a usage question, hope that's ok!

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by MichalMoravik
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
documentation Improvements or additions to documentation unconfirmed Needs triage.
2 participants
Converted from issue

This discussion was converted from issue #1444 on October 22, 2024 13:04.