Yesterday we used $state.eager to show immediate feedback when switching tabs. Today we take it further with the fork function — preloading data before the user even clicks. In SvelteKit, hovering over links triggers automatic data fetching. Now you can bring that same pattern to your own components. Import fork from svelte, pass a function that modifies state, and the changes happen in an off-screen DOM. When the user clicks, call commit and the content appears instantly. If they navigate away, call discard to clean up. Speculative loading made simple.
Docs: https://svelte.dev/docs/svelte/svelte...