-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
layout engine render pure html twice with SSR #148
Comments
I confirmed that this is a bug. It looks like the server rendered content is correct, but that the hydration on the client side is causing the creation of the duplicate dom element. It's likely because the root element for single-spa-layout is the |
Looked into the code for this and it's because |
I've created #150 which fixes this. It's a pretty big change so I need to do further testing before publishing as latest. I've published it as [email protected], under the If you have a chance to try it out, let me know. I will also be planning on testing things further myself - so far I've just tested it with unit tests but need to try it in a real browser, too. |
Hi @joeldenning, thanks for implementing the fix for this issue. I saw that the fix should also be included in version 1.7.0-beta.0, but when installing this version, there are no files (except LICENSE, README, and package.json) downloaded from npm. I also saw the build step in the GH actions failed for the tag Would it be possible to re-release the version (or a new patch version) that contains the fix? We're not really able yet to upgrade to [email protected] because of #158 If there is anything I could do to bring the fix live in [email protected], I would be happy to help. |
…ngle-spa#137. (single-spa#138) 1.6.0 Upgrade dependencies (single-spa#143) * Upgrade dependencies * Fix single-spa dependency * Fixes * Fix * Fix tests * Upgrade single-spa 2.0.0-beta.0 Implement hydration. Resolves single-spa#148 (single-spa#150) * One approach for hydration * With console logs * Things * Formatting * Fixes * 1.7.0-beta.0 * 2.0.0-beta.1 * Fix tests * Fix tests * Skip unnecessary builds 2.0.0 Fix empty content string bug (single-spa#153) Co-authored-by: Marcus Resell <[email protected]> 2.0.1 Resolve Resolve Resolve Resolve type issues Update build config Update Create MergeStream Update Update Update Reimplement flows Bump to 0.0.3 Update Add support for PipeableStream Update Update
Hi, any workaround here? I am using the 2.2.0 version of layout package, the bug still reproduces, plain html is rendered twice |
Describe the bug or question
When I put pure html in
<single-spa-router></single-spa-router>
, it will be rendered twice.When i put pure html in
<body></body>
, it is only rendered one time.Expected behavior
It should be render one time.
The text was updated successfully, but these errors were encountered: