-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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] <Teleport> cause hydration to fail #3869
Comments
This is expected because you need to explicitly handle SSRed Teleports. They are exposed on the ssr context: const ctx = {}
const html = await renderToString(app, ctx)
console..log(ctx.teleports) You need to return this from |
What's your mean is i should use some library like |
How does the injection in rendered HTML work? when i check the rendered html string, the container it should teleport to is empty, without any comment. So how do i know where i have to add the teleport code? And when i check the ctx object their is a teleport buffer containing arrays. I am really questioning myself how to handle this |
@yyx990803 can you provide an example of that injection?? Doesn't it make sense to mention this in The Vue documentation part about teleport, or the SSR part? |
when i check the mentioned ctx object i get:
so there is no teleports object, only a __teleportBuffers object containing arrays which i don't know how to handle. Using vue 3 with vite. |
It seems my problem is related to this: #4440 |
Version
3.1.0-beta.6
Reproduction link
https://codesandbox.io/s/wizardly-kepler-y8n48
Steps to reproduce
Open sandbox link and check browser console.
What is expected?
Hydration should succeed.
What is actually happening?
It seems that some Teleport comments are causing hydration to fail.
The text was updated successfully, but these errors were encountered: