Lack of `<Suspense>` wrapping an `async setup` component should warn
Version
3.0.2
Reproduction link
https://codesandbox.io/s/competent-darwin-lv4zh?file=/src/use/usePropsLoaded.js
Steps to reproduce
Open the codesandbox link and wait 2 seconds. The usePropsLoaded hook returns a promise which resolves when all props of said component are filled. Or thats what it tries to do. Neither #fallback or #default renders at all.
What is expected?
#fallback (at least) to render
What is actually happening?
An warning is thrown on the console: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug.
You have to use Suspense on the parent (App.vue) of hello world. There use to be a warning for that, It's weird it's gone
While adding Suspense warnings, for as long that #2215 isn't fixed is it possible to also add a warning when a Suspense
catches a nested async setup but doesn't recede to pending. I mentioned it in the comments of that other issue, the code that needs a warning is here:
Currently your async setup component just doesn't show up. Blank screen, no warning on console, no error in JS.
You have to use Suspense on the parent (App.vue) of hello world.
@posva what about detecting that a Promise was returned, and then await automatically? What's the downside to that?
It used to warn but was removed (in this commit https://github.com/vuejs/vue-next/pull/2099/files#diff-56930a63772d2e89f19432918b9d6ed851ede4159b0d32404e0c1d8c159fec99L1241)
PR #3657 should fix it when merged