-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
encounter " Hydration node mismatch" when using keep-alive in ssr rendering #4817
Comments
I'm having the same problem, using Quasar framework. The component rendered by |
This comment has been minimized.
This comment has been minimized.
I am also noticing something similar also happen with the fragment comments
Nothing actually seems to be mismatched besides these comments. From what I can tell they are used for v-for and , possibly also for components with more than 1 root element. |
Same problem here. @tcstory Could you find a solution? |
Was anyone able to find a solution for this? Have the same problem using Quasar 2.5.4 @tcstory |
It seems that the server-side rendering code core/packages/runtime-core/src/components/KeepAlive.ts Lines 98 to 101 in 1070f12
if (!sharedContext.renderer) {
return () => {
if (!slots.default) {
return null;
}
const children = slots.default();
if (children.length > 1) {
warn(`KeepAlive should contain exactly one component child.`);
return children;
}
return children[0];
}
} |
Version
3.2.20
Reproduction link
github.com
Steps to reproduce
first, change the App.vue file to the following( replace
<Suspense>
with<keep-alive>
)second, run
pnpm run dev
third, access http://localhost:3000/
and you will see the error in console panel.
What is expected?
no error is reported
What is actually happening?
there is a error
even though the reproduction project is using vite, the error is still there when you using webpack.
The text was updated successfully, but these errors were encountered: