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

SSR teleports don't work with Suspense #6207

Open
danielroe opened this issue Jun 30, 2022 · 0 comments · May be fixed by #9431
Open

SSR teleports don't work with Suspense #6207

danielroe opened this issue Jun 30, 2022 · 0 comments · May be fixed by #9431

Comments

@danielroe
Copy link
Member

danielroe commented Jun 30, 2022

Vue version

3.2.37

Link to minimal reproduction

https://stackblitz.com/edit/github-kqkhhq

Steps to reproduce

The following code is sufficient to reproduce the bug:

<Teleport to="#async">
  <Suspense>
    <SomeAsyncComponent />
  </Suspense>
</Teleport>

In the reproduction sandbox, you can see that on client-side this behaves correctly (and would hydrate HTML that rendered correctly), and also that this behaves fine on SSR with a sync component.

Note that the same behaviour is displayed if suspense is lifted higher (some nodes higher than teleport) or is nested deeper within the teleport.

What is expected?

It's expected that the async component will render into the teleport on SSR.

What is actually happening?

Instead, all that is rendered is the teleport anchor.

System Info

Stackblitz.

Any additional comments?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants