Vue: Pending prefetch blocks navigation until deferred props resolve
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 32/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- frontend
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- TypeScript
- Stars
- 684
- Forks
- 83
- Avg merge
- 15h 22m
- Merged PRs (30d)
- 219
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from voidzero-dev/void
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
voidzero-dev/void#835 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
voidzero-dev/void#834 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
voidzero-dev/void#833 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
voidzero-dev/void#825 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
voidzero-dev/void#808 · 1 comment ·
Maintainers usually reply within 1 day
All issues in voidzero-dev/void
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
open-webui/tether#52 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AykutSarac/jsoncrack.com#616 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
melgarafael/DeskcommCRM#4679 ·
Maintainers usually reply within 1 day
-
enhancement size:medium
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day