Skip to content

Commit f7a3217

Browse files
committed
chore: Could it be that easy?
1 parent 47cb34e commit f7a3217

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/nuqs/src/cache.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// @ts-ignore
2-
import { cache } from 'react'
1+
import * as React from 'react'
32
import type { SearchParams, UrlKeys } from './defs'
43
import { error } from './errors'
54
import { createLoader } from './loader'
@@ -27,7 +26,7 @@ export function createSearchParamsCache<Parsers extends ParserMap>(
2726
// whereas a simple object would be bound to the lifecycle of the process,
2827
// which may be reused between requests in a serverless environment
2928
// (warm lambdas on Vercel or AWS).
30-
const getCache = cache<() => Cache>(() => ({
29+
const getCache = React.cache<() => Cache>(() => ({
3130
searchParams: {}
3231
}))
3332

0 commit comments

Comments
 (0)