Given this +layout.svelte:
<div class="app">
<Header />
<main>
{@render children()}
</main>
</div>
if I do a goto in a component, the Header does not refresh (as i think svelte thinks only the children can change). how can I make the Header refresh as well?
note that in the Header i have some code that uses page so i was thinking full reactivity should kick (if Header depends on page.url it should refresh if page.url changes but that is not happening)
Header.svelte:
const init = async () => {
if (page.url.pathname === '/error') {
// do something
}
}
onMount(init)