Hydration not working in Layout.svelte
See original GitHub issueI have this setup in my Layout.svelte file
<script>
import Notification from '../components/shared/Notification.svelte';
export let templateHtml, data;
</script>
<main>
{@html templateHtml}
</main>
<Notification hydrate-client={{}} />
And in the notification I just have
<p>Test</p>
However, the test paragraph doesn’t show up. If I use the component in the same way in Home.svelte or any other route it works properly.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Page options • Docs • SvelteKit
It will then render the component again in the browser to make it interactive in a process called hydration. For this reason, you...
Read more >Full Stack SvelteKit For Beginners - Joy of Code
SvelteKit is an opinionated full stack framework that ties the frontend and backend together delivering the best developer and user experience.
Read more >Getting Started with SvelteKit: 10 Tips | Rodney Lab
On top of partial hydration and islands architecture, another fantastic feature of ... The Svelte/SvelteKit relationship is not all that different to that ......
Read more >Build state-of-the-art web applications with SvelteKit. | b-nova
Build state-of-the-art web applications with SvelteKit. · SvelteKit? · Setup · Hot code replacement · Routing · Layout · Loading data · Rendering...
Read more >Unable to pass data from layout.server.js to layout.js : r/sveltejs
Make sure you have a +layout.svelte defined. In my case my server wouldn't even start if I had a server-side only file and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@nickreese Thank you for your continuing effort. I was on version
1.0.4
and there it doesn’t work. However now that I’ve updated to1.1.1
it works perfectly.I feel very optimistic about migrating to elder.js!
@flauc Woot! Awesome. Glad it is working for you. 👍