@@ -275,52 +275,6 @@ const isHydratingWithServerContent = shallowRef(
275275)
276276const hasServerContentOnly = shallowRef (hasEmptyPayload && nuxtApp .payload .path === route .path )
277277
278- watch (
279- [
280- () => hasEmptyPayload ,
281- () => hasServerContentOnly .value ,
282- () => isSpaFallback .value ,
283- () => isHydratingWithServerContent .value ,
284- () => status .value ,
285- () => pkg .value ,
286- () => readmeData .value ,
287- () => Object .keys (nuxtApp .payload .data ?? {}).length ,
288- () => resolvedVersion .value ,
289- () => requestedVersion .value ,
290- ],
291- ([
292- hasEmptyPayloadArg ,
293- hasServerContentOnlyArg ,
294- isSpaFallbackArg ,
295- isHydratingWithServerContentArg ,
296- statusArg ,
297- pkgArg ,
298- readmeDataArg ,
299- dataLengthArg ,
300- resolvedVersionArg ,
301- requestedVersionArg ,
302- ]) => {
303- console .log (' main bunch' , {
304- hasEmptyPayloadArg ,
305- hasServerContentOnlyArg ,
306- isSpaFallbackArg ,
307- isHydratingWithServerContentArg ,
308- statusArg ,
309- pkgArg ,
310- readmeDataArg ,
311- dataLengthArg ,
312- resolvedVersionArg ,
313- requestedVersionArg ,
314- })
315- },
316- )
317- watch (
318- () => nuxtApp .payload .data ,
319- data => {
320- console .log (' nuxtApp.payload.data' , data , Object .keys (data ?? {}))
321- },
322- { immediate: true },
323- )
324278// When we have server-rendered content but no payload data, capture the server
325279// DOM before Vue's hydration replaces it. This lets us show the server-rendered
326280// HTML as a static snapshot while data refetches, avoiding any visual flash.
@@ -793,7 +747,9 @@ const showSkeleton = shallowRef(false)
793747 <!-- During hydration without payload, show captured server HTML as a static snapshot.
794748 This avoids a visual flash: the user sees the server content while data refetches.
795749 v-html is safe here: the content originates from the server's own SSR output,
796- captured from the DOM before hydration — it is not user-controlled input. -->
750+ captured from the DOM before hydration — it is not user-controlled input.
751+ We also show SSR output until critical data is loaded, so that after rendering dynamic
752+ content, the user receives the same result as he received from the server-->
797753 <article
798754 v-else-if ="
799755 isHydratingWithServerContent ||
0 commit comments