47ng / nuqs

Type-safe search params state manager for React frameworks - Like useState, but stored in the URL query string.
https://nuqs.47ng.com
MIT License
4.86k stars 104 forks source link

feat: Async cache [experimental] #724

Closed franky47 closed 1 week ago

franky47 commented 3 weeks ago

To leverage Next.js 15's async searchParams prop and PPR, we can defer the parsing of search params to where they are actually used, rather than blocking rendering for top-level elements of the page.

Highly experimental, not sure how best to introduce it retro-compatibly with the existing cache (with sync/async overloads, but still top-level blocking PPR). So for now it's a fork.

vercel[bot] commented 3 weeks 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 Nov 5, 2024 2:59pm
pkg-pr-new[bot] commented 3 weeks ago

Open in Stackblitz

pnpm add https://pkg.pr.new/nuqs@724

commit: b86b23b

franky47 commented 1 week ago

Closing as not planned, since there may be changes to the way the React cache function works that impacts the nuqs cache feature.

Source:

image