Uploaded December 2023 | Updated November 2026, 18 hours ago
The idea of exported global state (stores or $state objects) from a module may be fine if you're running a SPA, but as soon as Server Side Rendering (SSR) is introduced by a meta-framework like SvelteKit, this is a major foot gun.
In this video, we'll discuss why a global module state is problematic when combined with SSR and how we can _safely_ implement a global app state that isn't too burdensome to use!
π GitHub Discussion: github.com/sveltejs/kit/discussions/4339
π SvelteKit State Management Docs: https://kit.svelte.dev/docs/state-management
π Modern SaaS Course: hbyt.us/modern-saas
π¬ Discord: hbyt.us/discord
π¦ X/Twitter: hbyt.us/twitter
π₯οΈ Setup Stuff: hbyt.us/gear
π Topics Covered:
- SvelteKit v2
- Sveltekit 2
- Svelte 5 global state
- Svelte 5 reactivity
- Svelte 5 stores
- Svelte 5 class state
- Svelte 5 global reactivity
- Svelte 5 tutorial
- Svelte stores SSR
- Svelte SSR security
- Svelte store security
- Svelte security tips
- Svelte 5 reactive classes
- Svelte 5 features
- Svelte Context API
- Svelte 5 Context
The idea of exported global state (stores or $state objects) from a module may be fine if you're running a SPA, but as soon as Server Side Rendering (SSR) is introduced by a meta-framework like SvelteKit, this is a major foot gun.
In this video, we'll discuss why a global module state is problematic when combined with SSR and how we can _safely_ implement a global app state that isn't too burdensome to use!
π GitHub Discussion: github.com/sveltejs/kit/discussions/4339
π SvelteKit State Management Docs: https://kit.svelte.dev/docs/state-management
π Modern SaaS Course: hbyt.us/modern-saas
π¬ Discord: hbyt.us/discord
π¦ X/Twitter: hbyt.us/twitter
π₯οΈ Setup Stuff: hbyt.us/gear
π Topics Covered:
- SvelteKit v2
- Sveltekit 2
- Svelte 5 global state
- Svelte 5 reactivity
- Svelte 5 stores
- Svelte 5 class state
- Svelte 5 global reactivity
- Svelte 5 tutorial
- Svelte stores SSR
- Svelte SSR security
- Svelte store security
- Svelte security tips
- Svelte 5 reactive classes
- Svelte 5 features
- Svelte Context API
- Svelte 5 Context










