Skip to content

Update router.prefetch documentation to include locale option#39442

Merged
ijjk merged 2 commits intovercel:canaryfrom
jonohewitt:patch-1
Aug 10, 2022
Merged

Update router.prefetch documentation to include locale option#39442
ijjk merged 2 commits intovercel:canaryfrom
jonohewitt:patch-1

Conversation

@jonohewitt
Copy link
Copy Markdown
Contributor

Includes some basic documentation for setting the locale as an option within router.prefetch. I was quite confused when I was looking to use this feature recently and couldn't see it in the docs.

Wording is adapted from:

- `locale` - The active locale is automatically prepended. `locale` allows for providing a different locale. When `false` `href` has to include the locale as the default behavior is disabled.

There is also an undocumented priority boolean option described in the typescript types however having just tested it, it doesn't seem to have any effect so perhaps it's not ready for documentation and I have left it out.

Feature

  • Documentation added

Include documentation for setting the locale as an option within `router.prefetch`.
Copy link
Copy Markdown
Member

@ijjk ijjk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ijjk ijjk merged commit 7d59da9 into vercel:canary Aug 10, 2022
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants