Custom Svelte Store: derived() Svelte store

preview_player
Показать описание
Custom Svelte Store: derived() Svelte store

📚 Related Resources

🔗 Want to learn more from me? Check out these links:

#svelte #sveltestore

Thanks for watching 🥰 -- with love, Li Hau
Рекомендации по теме
Комментарии
Автор

Always the best explanation of all things Svelte thank you LiHau!

kosnowman
Автор

Thank you! The fact that the second argument must also be an array (6:30) in case of multiple stores, solved an error I've been trying to figure out all morning... your content is really great, keep it up! :)

gabrieluhlir
Автор

At last. Good explanation of what the heck this "set" func in derived store is needed for. Unfortunately Svelte Docs is shitty and doesn't give thorough enough explanation for it.

Thank you very much Lihau!

k.safonov
Автор

Thanks for the video dude, i have been looking at the docs for like 5 hours now and cant get my head around the derived stores yet haha. this made me understand everything, thanks!!

raprocks
Автор

Thank you so much! I've been trying to figure something out! I knew derived stores had to be the answer, just wasn't sure about the relationship between num, $num in the examples! Intuitively just the wrong way around!

jameshill
Автор

This is killer content, Li Hau! Good job!

kevinak
Автор

Cool! The asynchronously delayed store could be used for debouncing events! The first thing that comes to mind is a search box which fetches autocomplete suggestions from the server that debounces on the input event.

rainerwahnsinn
Автор

Oh, this is extremelly useful, it was exactly what I was looking for, I create a custom store called savable, that saves the content to localStorage, but to display the store value I want something that show only what I want, the savable has an array and I want only a single item, for example. It was possible to do this using normal functions, but derived stores are a nicer way

DanielRios
Автор

The WebStorm intellisense wasn't detecting my alias to a directory `scr/utils`, which was a bit wierd and uncomfy for me, so I move my `utils` to `src/lib` i.e. to use $lib/utils, is that a good practice?

DevBishwasBh
Автор

Hello lihau, this was so great. I was always wondering why i have to subscribe to the writable store when using $ syntax in the callback of the derived store. Turns out it doesn't. Also your explanaition about sync and async, so great. Thanks. At the end I was waiting for creating derived store of a derived store. I am doing this in one of my projects and it's working fine.

hoelldrio
Автор

Amazing as always! Do you know if it's possible to tween the result of a derived store? Or does the derived store need to be deriving it from a tweened store to begin with?

jasonhetherington