@@ -15,11 +15,11 @@ import { patchHistory, type SearchParamsSyncEmitter } from './lib/patch-history'
15
15
16
16
const emitter : SearchParamsSyncEmitter = mitt ( )
17
17
18
- function generateUpdateUrlFn ( reloadPageOnShallowFalseUpdates : boolean ) {
18
+ function generateUpdateUrlFn ( fullPageNavigationOnShallowFalseUpdates : boolean ) {
19
19
return function updateUrl ( search : URLSearchParams , options : AdapterOptions ) {
20
20
const url = new URL ( location . href )
21
21
url . search = renderQueryString ( search )
22
- if ( reloadPageOnShallowFalseUpdates && options . shallow === false ) {
22
+ if ( fullPageNavigationOnShallowFalseUpdates && options . shallow === false ) {
23
23
const method =
24
24
options . history === 'push' ? location . assign : location . replace
25
25
method . call ( location , url )
@@ -36,11 +36,11 @@ function generateUpdateUrlFn(reloadPageOnShallowFalseUpdates: boolean) {
36
36
}
37
37
38
38
const NuqsReactAdapterContext = createContext ( {
39
- reloadPageOnShallowFalseUpdates : false
39
+ fullPageNavigationOnShallowFalseUpdates : false
40
40
} )
41
41
42
42
function useNuqsReactAdapter ( ) {
43
- const { reloadPageOnShallowFalseUpdates } = useContext (
43
+ const { fullPageNavigationOnShallowFalseUpdates } = useContext (
44
44
NuqsReactAdapterContext
45
45
)
46
46
const [ searchParams , setSearchParams ] = useState ( ( ) => {
@@ -63,8 +63,8 @@ function useNuqsReactAdapter() {
63
63
}
64
64
} , [ ] )
65
65
const updateUrl = useMemo (
66
- ( ) => generateUpdateUrlFn ( reloadPageOnShallowFalseUpdates ) ,
67
- [ reloadPageOnShallowFalseUpdates ]
66
+ ( ) => generateUpdateUrlFn ( fullPageNavigationOnShallowFalseUpdates ) ,
67
+ [ fullPageNavigationOnShallowFalseUpdates ]
68
68
)
69
69
return {
70
70
searchParams,
@@ -76,14 +76,14 @@ const NuqsReactAdapter = createAdapterProvider(useNuqsReactAdapter)
76
76
77
77
export function NuqsAdapter ( {
78
78
children,
79
- reloadPageOnShallowFalseUpdates = false
79
+ fullPageNavigationOnShallowFalseUpdates = false
80
80
} : {
81
81
children : ReactNode
82
- reloadPageOnShallowFalseUpdates ?: boolean
82
+ fullPageNavigationOnShallowFalseUpdates ?: boolean
83
83
} ) {
84
84
return createElement (
85
85
NuqsReactAdapterContext . Provider ,
86
- { value : { reloadPageOnShallowFalseUpdates } } ,
86
+ { value : { fullPageNavigationOnShallowFalseUpdates } } ,
87
87
createElement ( NuqsReactAdapter , null , children )
88
88
)
89
89
}
0 commit comments