Open timhn-bm opened 1 month ago
Hey :wave: thanks for opening the issue !
You repo seems to be private, you can also use stackblitz to avoid having to create a repo in your gh
Would you be able to provide a reproduction? 🙏
Sorry, I had missed your message @huang-julien !
I just changed it to public. Weirdly, I had issues creating a reproducible stackblitz :/ Let me know if you prefer me to create a StackBlitz instead of a git repo before looking into this, thanks :)
I also encountered the same problem
Environment
Reproduction
https://github.com/timhn-bm/nuxt-client-fallback-errors
I've added 2 pages
/works
- not using theErrorBoundary
wrapper: it behaves correctly :heavy_check_mark:/bugs
- using theErrorBoundary
wrapper: it reproduces the bug :red_circle:Describe the bug
When building a wrapper around
NuxtClientFallback
and using it is used in multiple places on one page, given that one wrapped component throws an error, then all instances ofNuxtClientFallback
will display thefallback
slot only after hydrationAdditional context
I want to build a wrapper component around
NuxtClientFallback
.The wrapper - let's call it
ErrorBoundary
- can look like this in its simplest formIf I create a page with the following template:
A
B
andC
are wrapped by my customErrorBoundary
.If
A
throws an error -> after hydration, then the error slot will also by displayed forB
andC
The very weird this, is that if I use directly
NuxtClientFallback
instead of my wrapperErrorBoundary
, then everything behaves as expected.Thanks for your help in advance !
Logs
No response