Closed franky47 closed 2 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
nuqs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Sep 26, 2024 8:15am |
:tada: This PR is included in version 1.19.3 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Next.js 15.0.0-canary-171 introduced a breaking change in https://github.com/vercel/next.js/pull/68812 causing the searchParam page prop to be a Promise.
Using overloads, the cache.parse function can now handle either, but typing the searchParams page prop in userland is becoming painful if support for both Next.js 14 and 15 is desired.
Best approach is to always declare it as a Promise (with
SearchParams
imported from 'nuqs/server'), as it highlights the need to await the result of the parser, and doesn't cause runtime issues if the underlyign type is a plain object (the await becomes a no-op).