We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 47cb34e commit f7a3217Copy full SHA for f7a3217
packages/nuqs/src/cache.ts
@@ -1,5 +1,4 @@
1
-// @ts-ignore
2
-import { cache } from 'react'
+import * as React from 'react'
3
import type { SearchParams, UrlKeys } from './defs'
4
import { error } from './errors'
5
import { createLoader } from './loader'
@@ -27,7 +26,7 @@ export function createSearchParamsCache<Parsers extends ParserMap>(
27
26
// whereas a simple object would be bound to the lifecycle of the process,
28
// which may be reused between requests in a serverless environment
29
// (warm lambdas on Vercel or AWS).
30
- const getCache = cache<() => Cache>(() => ({
+ const getCache = React.cache<() => Cache>(() => ({
31
searchParams: {}
32
}))
33
0 commit comments