Skip to content

Do nuqs support hash mode? #470

Answered by franky47
arvinxx asked this question in Q&A
Jan 21, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

It currently doesn't, only search params.

Some issues with hash mode to consider:

  • Hash is never sent to the server, this makes it incompatible with shallow: false
  • The URL hash does not have a structure, unlike the query string with the URLSearchParams interface. While it could be adapted (essentially replacing ? with #), Next.js would probably not re-render when the hash is updated (TBC).

Note that search params updates are local-first (not sent to the server) by default in nuqs.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@arvinxx
Comment options

Answer selected by franky47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants