Video details

Svelte Store: Getting the current store value outside of Svelte component


If you are used to the $-prefixed variable to access the value of the store, great, but that only works in a .svelte component. Ever wonder how would you do it outside of the Svelte component?
A svelte store is any variable that follows the svelte store contract, which means the only method you can use to figure out the value is the `subscribe` method.
Related Resources get()
🥰 Support me
Want to learn more from me? Check out these links:
Twitter: Blog: Newsletter:
#svelte #sveltestore
Thanks for watching 🥰 -- with love, Li Hau