What's the difference between Store and Context? Why would you want to use store over context, or context over store?
And most importantly, when you should use store, context or both?
---
đź’»
REPL: https://svelte.dev/repl/0399bbd870524e15b5ce67e35c782deb?version=3.37.0 https://svelte.dev/repl/cd6cc4a3efbf469bb57acd059ed6623a?version=3.37.0 (static global) https://svelte.dev/repl/9ae99d6ead9c4459a375672e709f7241?version=3.37.0 (static locals) https://svelte.dev/repl/6bbf0c6efa434c699bfe4db084a6448a?version=3.37.0 (dynamic global) https://svelte.dev/repl/f3fc531a2c424e9496d370e5c6333991?version=3.37.0 (dynamic locals)
📚
Related Resources Svelte Tutorial: Context API https://svelte.dev/tutorial/context-api Svelte Tutorial: Stores https://svelte.dev/tutorial/writable-stores
🥰 Support me https://www.buymeacoffee.com/lihautan
đź”—
Want to learn more from me? Check out these links:
Twitter: https://twitter.com/lihautan Blog: https://lihautan.com/ Newsletter: https://lihautan.com/newsletter
#svelte #sveltestore
Thanks for watching 🥰 -- with love, Li Hau