Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suspense regression when toggling an async component in rc.11 #2132

Closed
cexbrayat opened this issue Sep 16, 2020 · 2 comments
Closed

Suspense regression when toggling an async component in rc.11 #2132

cexbrayat opened this issue Sep 16, 2020 · 2 comments

Comments

@cexbrayat
Copy link
Member

Version

3.0.0-rc.11

Reproduction link

https://jsfiddle.net/eyq3d0mL/

Steps to reproduce

Consider an async component hello mounted via a Suspense like this:

<Suspense>
  <div>
    <button @click="toggled = !toggled">Toggle {{ toggled }}</button>
    <div v-if="toggled">
      <hello />
    </div>
  </div>
  <template #fallback>Loading...</template>
</Suspense>

What is expected?

In rc.10, when clicking on the toggling button, the loading indicator is displayed, then the async component

What is actually happening?

In rc.11, nothing happens

@yyx990803
Copy link
Member

yyx990803 commented Sep 16, 2020

Not really a regression - Suspense usage has been reworked. In short, only suspense root node toggles will trigger pending state now. More details in #2099

@cexbrayat
Copy link
Member Author

@yyx990803 Ok thanks, i saw the changes but thought this one would still work.

I still have something weird I think:

<button @click="toggled = !toggled">Toggle {{ toggled }}</button>
<Suspense>
  <div v-if="toggled">
    <hello />
  </div>
  <template #fallback>Loading...</template>
</Suspense>

works, but the loading indicator is not displayed when toggling. Is it expected as well?

See https://jsfiddle.net/7d2zm9xk/

@github-actions github-actions bot locked and limited conversation to collaborators Nov 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants