Rich Harris

Results 788 comments of Rich Harris

The invalidation conditions are explained in https://kit.svelte.dev/docs/load#invalidation. To answer your questions: 1. They're the same thing 2. You don't — `load` will re-run if the conditions are met. If that's...

Aside from https://github.com/sveltejs/kit/pull/6813#pullrequestreview-1108148449 this looks fine, though I can't shake the feeling that the code is trying to tell us we're thinking about some of this stuff in slightly the...

> Should `type: "unload"` only be fired when the user closes the browser tab by hand and not during a navigation? Ya know... that makes a lot of sense. I'm...

`manual` isn't a great alternative though. Almost all navigation is the result of some manual action! One option we considered is `close`, which is appropriate in the case that it's...

Yeah, `enter`/`leave` is a good suggestion. I like that. In a similar vein `start`/`end` could also work, though `enter` arguably makes more sense than `start` if `afterNavigate` is fired after...

I'm in favour of the current changes — given that `enter` only happens with `afterNavigate` and `leave` only happens with `beforeNavigate`, I'd argue it's much less confusing than having the...

The types stuff would be a nice bonus but I'm not 100% sure what the best way to do that is, so I'll merge this and open a fresh issue

I remember this being finicky when I last looked into it, but: could we handle the SPA initialisation case differently to how we handle hydration and navigation, and never fall...

In theory we know if a given page load is an SPA page load, because `hydrate` is `false`: https://github.com/sveltejs/kit/blob/3c3b6a82efd6517f1327bf47bec7d96e8590b96d/packages/kit/src/runtime/client/start.js#L30-L34

It would be helpful to have some concrete use cases for this. We've discussed it a fair amount but so far determined that it wouldn't be a good addition, because...