47ng / nuqs

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

500 error on demo site. #603

Open ariesclark opened 1 month ago

ariesclark commented 1 month ago

https://github.com/user-attachments/assets/772d01d2-efdb-4b27-9269-16fe193df24e

franky47 commented 2 weeks ago

Thanks for the report, I was able to reproduce it too.

nuqs comes with a thottling mechanism for updating the URL, to circumvent rate-limits set by browsers (which trigger this error).

After trying to tweak those rates, thinking browsers may have updated them (it happened with Safari), I found that I needed to consistently double all rates. Looking at the debug logs, this comes from Next.js also doing history updates on navigation, essentially doubling the number of calls (and so require double the time between them to stay within rate limits).