Lazy store
See original GitHub issueHi, is there a way to only initialize the store at the moment that a component has used it? And is there a way to have a callback when there are no active listeners? svelte/store
has this and is quite similar to zustand.
My usecase is a graphql subscription that is only needed temporarily.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
LazyOne: Funny Family Pajamas – Men, Women, Kids, Pets ...
Add some fun to bed time with our cute & funny pajamas for the whole family! From infant onesies to our Flapjacks for...
Read more >Lazy store (@lazy_storee) • Instagram photos and videos
2569 Followers, 2529 Following, 227 Posts - See Instagram photos and videos from Welcome to Lazy store (@lazy_storee)
Read more >The Lazy Store - Facebook
The Lazy Store. Nov 6, 2016. Love for Pom-poms Priced at 120+shipping. To place your order DM us or whatsapp us at 9582044680...
Read more >Lazy One - Amazon.com
Lazy One Logo. Lazy One. + Follow. Home · Best Sellers · Women. Back; Women · Adult Onesie Pajamas · Women's Regular Sets...
Read more >Cowboy Boots, Cowboy Hats, Western Apparel | Lazy J Ranch ...
The Lazy J is a ranch apparel store with two store fronts located in the Stockyards and Willow Park Texas. Lazy J exists...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So, if I were to do something like this, it could be non lazy store, but with listener count.
Just an idea… There might be a better way, like subscribe function returning unsubscribe function.
I’m not sure if I understand what
createLazy
is like, but in general, we would be strict about making breaking changes and adding new core features, as we think the api is basically complete. A PR for middleware would be appreciated (although, I can’t say for sure if it would be merged at this point.)