TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Type-safe search params state management for Next.js

10 点作者 franky479 个月前
Next.js has APIs to read and update search params (the &#x2F;?foo=bar part of the URL), but they lack type-safety for consistent keys and proper parsing&#x2F;serializing of JS data types. I found myself repeatedly building the same custom hook to get a React.useState-like approach. In 2021, I published it to NPM and then forgot about it.<p>Since then, the `nuqs` package has gained popularity and is now used by companies like Vercel, Auth.js, Gitbook, and Midday.ai, with 200K weekly downloads.<p>It&#x27;s been fun building this as a side project and automating as much as possible to ensure a high-quality output.

1 comment

pontusabra9 个月前
I really love nuqs, recommend it to everyone! thanks!