Skip to content

Commit dcaa285

Browse files
committed
fix: Update state cache when syncing from useSearchParams
1 parent ee38db3 commit dcaa285

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/nuqs/src/useQueryStates.ts

+1
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ export function useQueryStates<KeyMap extends UseQueryStatesKeysMap>(
133133
queryRef.current,
134134
stateRef.current
135135
)
136+
stateRef.current = state
136137
setInternalState(state)
137138
}, [
138139
Object.values(resolvedUrlKeys)

0 commit comments

Comments
 (0)