Sharing state without props and events using the Svelte Context API.
π΄ Patreon: https://www.patreon.com/joyofcode
π Twitter: https://twitter.com/joyofcodedev
π¬ Discord: https://discord.com/invite/k6ZpwAKwwZ
π₯ Uses: https://www.joyofcode.xyz/uses
π Post: https://joyofcode.xyz/master-the-svelte-context-api
π Context API: https://svelte.dev/docs/svelte/context
π Using Stores With Context: https://svelte.dev/docs/kit/state-management#Using-stores-with-context
π Timestamps
0:00 Intro
0:21 Sponsor
0:37 The Prop Drilling Problem
1:33 Creating The Context API Yourself
5:05 Passing Reactive State Through Context
7:22 Using Unique Keys For Context
9:14 The Svelte Context API
9:52 How The Context API Works
10:19 Global State Versus Context
11:27 How The Context API Works Under The Hood
13:28 Encapsulating And Typing Context
15:10 Practical Example Of Using The Context API
17:57 Outro
#joyofcode #sveltekit #svelte