We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5306ab commit 7174801Copy full SHA for 7174801
src/utils/cache.ts
@@ -41,20 +41,20 @@ export function initCache<Data = any>(
41
Data
42
>
43
44
+ // Update the state if it's new, or the provider has been extended.
45
+ SWRGlobalState.set(provider, [
46
+ EVENT_REVALIDATORS,
47
+ {},
48
49
50
51
52
+ mutate
53
+ ])
54
+
55
// This is a new provider, we need to initialize it and setup DOM events
56
// listeners for `focus` and `reconnect` actions.
57
if (!IS_SERVER) {
- // Update the state if it's new, or the provider has been extended.
- SWRGlobalState.set(provider, [
- EVENT_REVALIDATORS,
- {},
- mutate
- ])
-
58
opts.initFocus(
59
revalidateAllKeys.bind(
60
UNDEFINED,
0 commit comments