Skip to content

v1.0.13

Latest

Choose a tag to compare

@debabin debabin released this 12 Aug 10:30
· 7 commits to main since this release
f050767

Fix search params

This release fixes useUrlSearchParam and useUrlSearchParams writing to the URL during render, which broke Next.js App Router navigation.

Fixes

  • useUrlSearchParam — the initial value is no longer written to the URL from the useState initializer during render; seeding now happens in a mount effect, guarded so it only writes when the key is missing from the URL. This fixes broken Next.js App Router navigation and the "Cannot update a component while rendering a different component" warning.
  • useUrlSearchParams — same fix applied to the multi-key hook: the useState initializer is now pure and reads params only, with initial values seeded in a mount effect that writes just the keys missing from the URL, so pre-existing params are left untouched.