tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
288
fork
atom
a tool for shared writing and social publishing
288
fork
atom
overview
issues
26
pulls
pipelines
don't revalidate unless needed for some hook
awarm.space
1 week ago
b175fc7d
fcd70868
+11
-1
3 changed files
expand all
collapse all
unified
split
app
(home-pages)
home
HomeLayout.tsx
reader
GlobalContent.tsx
components
IdentityProvider.tsx
+5
-1
app/(home-pages)/home/HomeLayout.tsx
···
137
137
return { ...result, titles };
138
138
}
139
139
},
140
140
-
{ fallbackData: { facts: props.initialFacts, titles: props.titles } },
140
140
+
{
141
141
+
fallbackData: { facts: props.initialFacts, titles: props.titles },
142
142
+
revalidateOnFocus: false,
143
143
+
revalidateOnReconnect: false,
144
144
+
},
141
145
);
142
146
143
147
let { data: localLeaflets } = useSWR("leaflets", () => getHomeDocs(), {
+2
app/(home-pages)/reader/GlobalContent.tsx
···
22
22
},
23
23
{
24
24
fallbackData: { posts: initialData.posts },
25
25
+
revalidateOnFocus: false,
26
26
+
revalidateOnReconnect: false,
25
27
},
26
28
);
27
29
+4
components/IdentityProvider.tsx
···
34
34
}) {
35
35
let { data: identity, mutate } = useSWR("identity", () => getIdentityData(), {
36
36
fallbackData: props.initialValue,
37
37
+
revalidateOnFocus: false,
38
38
+
revalidateOnReconnect: false,
39
39
+
revalidateIfStale: false,
40
40
+
revalidateOnMount: false,
37
41
});
38
42
useEffect(() => {
39
43
mutate(props.initialValue);