framework icon indicating copy to clipboard operation
framework copied to clipboard

`pageTransition: false` breaks useFetch navigation block

Open warflash opened this issue 3 years ago • 1 comments

Environment


  • Operating System: Linux
  • Node Version: v16.14.2
  • Nuxt Version: 3.0.0-rc.8
  • Nitro Version: 0.5.4
  • Package Manager: [email protected]
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-dfgsnr?file=pages%2Fother.vue

Describe the bug

Setting

definePageMeta({
  pageTransition: false,
});

skips the blocking useFetch is supposed to do and shows a blank view instead

Additional context

Repro uses rc8 due to stackblitz issues with rc11, tested with rc11 locally tho and same issue

Logs

No response

warflash avatar Sep 21 '22 13:09 warflash

Similar to changing layouts, removing transitions results in an entire rerender of the page. Doing so while transitioning routes effectively breaks the normal <Suspense>-powered blocking navigation.

In other words, the cause is the same as https://github.com/nuxt/framework/issues/6592.

danielroe avatar Sep 21 '22 17:09 danielroe

There is a new proposal about the <Suspense> that may be the proper fix of this bug.

https://github.com/vuejs/core/pull/6736

By allow the child of the just created suspense boundary to be captured by parent boundary. This may be able to pause the dom update until the page completely loaded.

mmis1000 avatar Oct 08 '22 18:10 mmis1000

Yeah, I'm hoping we will see that PR get merged soon 🙏

warflash avatar Oct 08 '22 19:10 warflash