-
-
Notifications
You must be signed in to change notification settings - Fork 338
feat!: next-intl@4
#1412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
feat!: next-intl@4
#1412
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit 47239f9.
…currently active pathname for localized pathnames
# Conflicts: # packages/next-intl/src/middleware/utils.test.tsx # packages/next-intl/src/shared/utils.test.tsx
…is rendered from a Server Component (#1191) This should ease the transition from Server to Client Components, as you don't have to manually pass this prop anymore. If you've previously passed this prop manually, you can remove this assignment now. If this is not desired (e.g. because you have a large `formats` object that you don't want to pass to the client side), you can manually opt-out via `formats={{}}` on `NextIntlClientProvider` in order to not provide any formats on the client side. **BREAKING CHANGE:** There's a very rare chance where this can break existing behavior. If you're rendering `NextIntlClientProvider` in a Server Component, you rely on static rendering, but you're not using `unstable_setRequestLocale` (i.e. you're using hooks like `useTranslations` exclusively in Client Components), this can opt your page into dynamic rendering. If this affects you, please provide the `formats` prop explicitly to `NextIntlClientProvider`.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
If you have nested providers, previously only the configuration of the innermost one would be applied. With this change, configuration is now passed from one provider to the next, while allowing to override individual props. **BREAKING CHANGE:** There's a very rare chance that this change affects your app, but in case you've previously relied on providers not inheriting from each other, you now have to reset props manually in case you want to retain the prev. behavior.
# Conflicts: # packages/next-intl/.size-limit.ts
# Conflicts: # pnpm-lock.yaml
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Locale#1495useMessages&getMessages#1489NextIntlClientProviderinstances are present #1413formatswhenNextIntlClientProvideris rendered from a Server Component #1191localeto be returned fromgetRequestConfig#1486localeCookie: falseis set #1487now={new Date()}fromNextIntlClientProviderfor usage withformat.relativeTime(preparation fordynamicIO) #1536NextIntlClientProviderfor usinguseLocaleon the client side (preparation fordynamicIO) #1541null,undefinedorbooleanas an ICU argument #1561typescriptversion to 5 for projects using TypeScript #1481defineRouting#1560localeargument forgetRequestConfigto be used for overriding the locale #1625Messageswhen usingcreateTranslator#1655Messagesformessagesprop of provider #1679NextIntlClientProvider#1682i18n/request.ts#1695x-defaultalternate link also for sub pages when usinglocalePrefix: 'always'and update middleware matcher suggestion in docs #1720domainsto improve handling oflocalePrefix: 'as-needed'#1734pathnames#1743Related
Resolves #1153
Resolves #1452
Resolves #410
Resolves #779
Resolves #1464
Resolves #1670
Resolves #1694
Resolves #990