Svelte 5: If block
's presence inside an element which is targeted by mount or createRoot function causes hydration error.
#10389
Labels
awaiting submitter
needs a reproduction, or clarification
Describe the bug
If there is an if block inside an element which is being targetted by
mount
orcreatRoot
functions. as soon as these functions are run Svelte throws a hydration error.Reproduction
Let's say we have a simple component like bellow
and in our page we have the following code
As soon as you click on the button to create a new Test component inside that div you get a hydration error. Note that this will still happen even if we don't pass any props at all.
Logs
No response
System Info
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered: