Vue: Pending prefetch blocks navigation until deferred props resolve

Abierto
#832 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
32/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript
Área
frontend

Línea de trabajo

Start at packages/void/src/pages/navigation-engine.ts around lines 740-744, where the navigation waits on an in-flight prefetch before committing, and read how prefetch results are stored and later reused. Compare that path with the non-prefetch navigation path that renders core content and streams deferred props. Use the reproduction branch linked in the issue (prefetch-blocks-deferred-navigation) to observe both behaviours. Done means navigation to a deferred route no longer waits on a pending prefetch, while fully completed prefetches remain reusable.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

When a route uses defer(), clicking its link while a prefetch is still running delays the entire navigation until the deferred data resolves.
Without prefetch, the same route renders its core content immediately and streams the secondary data afterward.

Reproduced with [email protected] and @void/[email protected]. Not tested with 1.9.x but the relevant code is still in it so it should be the same.

Minimal reproduction

See https://github.com/TheAlexLichter/void-reproduction/tree/prefetch-blocks-deferred-navigation

Actual behavior

With the prefetch still pending, the current page remains visible until the deferred operation finishes. The next page's heading and loading state never get a chance to appear first.

With prefetch disabled, the heading and loading state appear before the deferred result.

Expected behavior

Navigation to a route with deferred props should be able to show its core content without waiting for secondary data, including when prefetching has already started. Fully completed prefetches should remain reusable.

Could Void either support consuming an in-flight prefetch progressively, or provide an option to reuse only completed prefetches and otherwise fall back to streamed navigation?

Current workaround

I disable automatic prefetch for routes with deferred sections. This restores progressive navigation, but means giving up automatic prefetching for those routes.

Lenguaje dominante
TypeScript
Estrellas
684
Forks
83
Merge medio
15 h 22 min
PR fusionados (30 d)
219

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de voidzero-dev/void

Todos los issues de voidzero-dev/void

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.