-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Hydration issue when loading HTML content from the server #13260
Comments
There seems to be an issue with the data when retrieved from <!-- +page.svelte -->
<script>
const { data } = $props();
</script>
<h2>Hey !</h2>
<div>
{data.personalMessage}
{@html data.personalMessage}
</div> The log statement in the component logs |
Any solution yet? I would use $props but doing so, it turns into runes mode. And I can't convert all reactive values to fix error of saying $derived, $effect needs to be used. So is there any way to fix it without going into runes mode? |
You can also |
This is a bug in |
I can't seem to reproduce this using the latest version of SvelteKit. Presumably, this has been fixed by #13192 because I can only reproduce it if I install SvelteKit 2.12.1, the version before the fix was released. |
Describe the bug
Following this issue and advice from @brunnerh, I'm posting the issue here.
I want to load HTML content from the server (initially supabase but I framed the issue) and display it on the page.
If I don't encapsulate the content in a
{@html ...}
it logically shows as plain text, but when I add it doesn't show and I get ahydration_html_changed
issue.Reproduction
I tried to set a REPL but
$app
does not compileLogs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: