Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hydration not working in Layout.svelte

See original GitHub issue

I have this setup in my Layout.svelte file

  import Notification from '../components/shared/Notification.svelte';

  export let templateHtml, data;

  {@html templateHtml}

<Notification hydrate-client={{}} />

And in the notification I just have


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:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

flauccommented, Oct 29, 2020

@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 to 1.1.1 it works perfectly.

I feel very optimistic about migrating to elder.js!

nickreesecommented, Oct 29, 2020

@flauc Woot! Awesome. Glad it is working for you. 👍

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found