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

docs: update with-i18n-routing.mdx with nextjs 15 params change #1401

Closed
wants to merge 1 commit into from

Conversation

ammubhave
Copy link

@ammubhave ammubhave commented Oct 4, 2024

Update app router with-i18n-routing with a nextjs 15 params change. In nextjs 15, the params property is a promise. Although direct access is still supported, it is deprecated.

If params is accessed directly, and not awaited then we get the following warning

In route /[locale] a param property was accessed directly with `params.locale`. `params` is now a Promise and should be awaited before accessing properties of the underlying params object. In this version of Next.js direct access to param properties is still supported to facilitate migration but in a future version you will be required to await `params`. If this use is inside an async function await it. If this use is inside a synchronous function then convert the function to async or await it from outside this function and pass the result in.

For more information see vercel/next.js#68812

Update app router with-i18n-routing with a nextjs 15 `params` change. In nextjs 15, the `params` property is a promise. Although direct access is still supported, it is deprecated.
Copy link

vercel bot commented Oct 4, 2024

@ammubhave is attempting to deploy a commit to the next-intl Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Oct 4, 2024

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

Name Status Preview Comments Updated (UTC)
next-intl-example-app-router ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 4, 2024 4:04pm
next-intl-example-app-router-without-i18n-routing ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 4, 2024 4:04pm

@amannn
Copy link
Owner

amannn commented Oct 7, 2024

Thanks for the proposed update! There will be a few more updates necessary to the docs, but let's wait for now until the stable release of Next.js 15 lands. I'll close this as a duplicate of #1089.

@amannn amannn closed this Oct 7, 2024
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.

2 participants