File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,6 @@ export const ReloadContext = createContext(async (): Promise<void> => {});
88
88
* Returns a stateful value which bounded to route, and a function to update it.
89
89
* Note that the value won't be updated across components.
90
90
* So you should use this only in top-most component
91
- * @experimental
92
91
* @param key unique key
93
92
* @param initial initial value
94
93
* @returns value and setter
@@ -98,7 +97,7 @@ export function useRouteState<T extends {}>(key: string, initial: T) {
98
97
const routeState = history . state ?? { } ;
99
98
history . replaceState ( { ...routeState , [ key ] : newvalue } , "" ) ;
100
99
return newvalue ;
101
- } , ( window ? .history ?. state ?. [ key ] ?? initial ) as unknown as T ) ;
100
+ } , ( globalThis . history ?. state ?. [ key ] ?? initial ) as unknown as T ) ;
102
101
}
103
102
104
103
export const RouterHost = ( {
You can’t perform that action at this time.
0 commit comments