You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of the v1 API was marked as deprecated back in September 2023, and has been removed in `nuqs@2.0.0`.
27
+
Some of the v1 API was marked as deprecated back in September 2023, and has been
28
+
removed in `nuqs@2.0.0`.
28
29
29
30
### `queryTypes` parsers object
30
31
31
-
Replace with `parseAsXYZ` to match, for better tree-shakeability:
32
+
The `queryTypes` object has been removed in favor of individual parser exports,
33
+
for better tree-shaking.
34
+
35
+
Replace with `parseAsXYZ` to match:
32
36
33
37
```diff
34
38
- import { queryTypes } from 'nuqs'
@@ -42,13 +46,17 @@ Replace with `parseAsXYZ` to match, for better tree-shakeability:
42
46
43
47
### `subscribeToQueryUpdates`
44
48
45
-
Next.js 14.0.5 makes `useSearchParams` reactive to shallow search params updates, which makes this internal helper function redundant. See #425 for context.
49
+
Next.js 14.0.5 makes `useSearchParams` reactive to shallow search params updates,
50
+
which makes this internal helper function redundant. See #425 for context.
46
51
47
52
## Renamed `nuqs/parsers` to `nuqs/server`
48
53
49
-
When introducing the server cache in #387, the dedicated export for parsers was reused as it didn't include the `"use client"` directive. Since it now contains more than parsers and probably will be extended with server-only code in the future, it has been renamed to a clearer export name.
54
+
When introducing the server cache in #387, the dedicated export for parsers was
55
+
reused as it didn't include the `"use client"` directive. Since it now contains
56
+
more than parsers and probably will be extended with server-only code in the future,
57
+
it has been renamed to a clearer export name.
50
58
51
-
Find and replace all occurrences of `'nuqs/parsers'` to `'nuqs/server'` in your code:
59
+
Find and replace all occurrences of `nuqs/parsers` to `nuqs/server` in your code:
52
60
53
61
```diff
54
62
- import { parseAsInteger, createSearchParamsCache } from 'nuqs/parsers'
@@ -57,7 +65,11 @@ Find and replace all occurrences of `'nuqs/parsers'` to `'nuqs/server'` in your
57
65
58
66
## Debug printout detection
59
67
60
-
After the rename to `nuqs`, the debugging printout detection logic handled either `next-usequerystate` or `nuqs` being present in the `localStorage.debug` variable. In `nuqs@2.0.0` it only checks for the presence of the `nuqs` substring to enable logs. Update your local dev environments to match by running this once in the devtools console:
68
+
After the rename to `nuqs`, the debugging printout detection logic handled either
69
+
`next-usequerystate` or `nuqs` being present in the `localStorage.debug` variable.
70
+
`nuqs@2.0.0` only checks for the presence of the `nuqs` substring to enable logs.
71
+
72
+
Update your local dev environments to match by running this once in the devtools console:
0 commit comments