Skip to content

Conversation

@iHiteshAgrawal
Copy link

Adds 7 production-ready pattern hooks for common URL state patterns:

  • use-pagination: Complete pagination with page size control
  • use-search: Debounced search with validation
  • use-sorting: Multi-column sorting with smart toggling
  • use-filters: Type-safe multi-filter management
  • use-multi-select: Array-based multi-selection
  • use-tabs: Type-safe tab navigation
  • use-date-range: Date range selection with presets

All hooks maintained at: https://github.com/iHiteshAgrawal/nuqs-presets

Adds 7 production-ready pattern hooks for common URL state patterns:
- use-pagination: Complete pagination with page size control
- use-search: Debounced search with validation
- use-sorting: Multi-column sorting with smart toggling
- use-filters: Type-safe multi-filter management
- use-multi-select: Array-based multi-selection
- use-tabs: Type-safe tab navigation
- use-date-range: Date range selection with presets

All hooks maintained at: https://github.com/iHiteshAgrawal/nuqs-presets
@vercel
Copy link

vercel bot commented Nov 14, 2025

@iHiteshAgrawal is attempting to deploy a commit to the 47ng Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@franky47 franky47 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome, thanks! 🙌

@vercel
Copy link

vercel bot commented Nov 14, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
nuqs Ready Ready Preview Comment Nov 17, 2025 7:57pm

@franky47 franky47 added documentation Improvements or additions to documentation registry Issues & PRs related to the shadcn registry labels Nov 14, 2025
@franky47 franky47 added this to the 🪵 Backlog milestone Nov 14, 2025
@iHiteshAgrawal iHiteshAgrawal marked this pull request as draft November 14, 2025 22:33
@iHiteshAgrawal
Copy link
Author

resolved all. ready for review again.

@iHiteshAgrawal iHiteshAgrawal marked this pull request as ready for review November 14, 2025 22:47
Copy link
Member

@franky47 franky47 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One issue I see with the way the files are laid out is that installing multiple hooks will overwrite each other (eg: ~/hooks/types/index.ts), even though the contents are identical.

Overall, each hook should be a single file, and avoid installing multiple levels of barrel files which bring little value to the person adding it in their codebase.

We could also prefix them with the project name to avoid conflicts with possible existing userland hooks, eg ~/hooks/nuqs-presets/useFilters.ts.

Anothing thing that makes nuqs' declarative model interesting is deriving other features from parser declarations (eg: loaders for server-side, serializer to generate href strings for links etc). I need to look into how it's structured in your repo, but having those exports would be good to allow composing those definitions in userland.

@iHiteshAgrawal
Copy link
Author

One issue I see with the way the files are laid out is that installing multiple hooks will overwrite each other (eg: ~/hooks/types/index.ts), even though the contents are identical.

Overall, each hook should be a single file, and avoid installing multiple levels of barrel files which bring little value to the person adding it in their codebase.

We could also prefix them with the project name to avoid conflicts with possible existing userland hooks, eg ~/hooks/nuqs-presets/useFilters.ts.

Anothing thing that makes nuqs' declarative model interesting is deriving other features from parser declarations (eg: loaders for server-side, serializer to generate href strings for links etc). I need to look into how it's structured in your repo, but having those exports would be good to allow composing those definitions in userland.

Hey. I've updated the registry to address the feedback. Every hook is now a single file and self-contained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation registry Issues & PRs related to the shadcn registry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants