-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
Bug with SSR and Hydration (Probably Caused by @html
)
#7115
Comments
Although the reproduction requires Svelte-Kit, I suspect the ultimate cause of the bug might be the |
Yes, you are probably right. I tried to reproduce the problem in the Svelte REPL (https://svelte.dev/repl), but got the following error:
|
@hbirler FYI in case you were interested in any more hydration edge cases |
Are you working on this issue? |
@baseballyama - No, I've got my hands full with other issues at the moment. |
@rmunn OK! I created PR! |
Describe the bug
Using multiple
{@html variable}
can make SvelteKit behave strangely. Essentially, the application is first SSR rendered into the correct state, then the hydration kicks in and incorrectly mutates the state.This means that the app flickers and that the resulting state is incorrect.
Reproduction
https://github.com/Acmion/svelte-kit-ssr-bug
Logs
System Info
Severity
annoyance
Additional Information
It is relatively easy to work around this problem by, for example, wrapping the
{@html variable}
statements in divs, like this:However, it is relatively hard to detect and understand what is causing this issue.
The text was updated successfully, but these errors were encountered: