Skip to content
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

fix: Allow to call getRequestConfig in outer module closure in a Client Component module graph #687

Merged
merged 1 commit into from
Dec 4, 2023

Conversation

amannn
Copy link
Owner

@amannn amannn commented Dec 4, 2023

Fixes #685

This is fixed for compatibility, since we've silently supported this pattern previously. However, it's still not recommended to call getRequestConfig in a Client Component module graph as the function can't do anything useful there. Instead, you can extract shared config like locales to a file like src/navigation.ts or any other module that is then imported into Client and Server Components.

@amannn amannn marked this pull request as ready for review December 4, 2023 06:40
Copy link

vercel bot commented Dec 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-intl-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 4, 2023 6:41am
next-intl-example-app-router ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 4, 2023 6:41am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: getRequestConfig is not supported in Client Components.
1 participant