You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// During the initial SSR render, warn if the key has no data pre-fetched via:
305
+
// - fallback data
306
+
// - preload calls
307
+
// - initial data from the cache provider
308
+
// We only warn once for each key during SSR.
309
+
if(
310
+
strictServerPrefetchWarning&&
311
+
isHydration&&
312
+
!suspense&&
313
+
hasKeyButNoData
314
+
){
315
+
console.warn(
316
+
`Missing pre-initiated data for serialized key "${key}" during server-side rendering. Data fethcing should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`
317
+
)
318
+
}
319
+
289
320
// - Suspense mode and there's stale data for the initial render.
290
321
// - Not suspense mode and there is no fallback data and `revalidateIfStale` is enabled.
291
322
// - `revalidateIfStale` is enabled but `data` is not defined.
"Missing pre-initiated data for serialized key "ssr:1" during server-side rendering. Data fethcing should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.",
116
+
"Missing pre-initiated data for serialized key "ssr:2" during server-side rendering. Data fethcing should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.",
117
+
]
118
+
`)
57
119
58
-
awaitscreen.findByText(
59
-
'Fallback data is required when using Suspense in SSR.'
0 commit comments