-
-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Multiple streams #6
Comments
Hey @scullabyte this is not possible yet. The only thing that I struggle with when it comes to multiple streams is how we'll distinguish the data that's fetched and how it will be stored. Currently it's available through the data property but if there's multiple streams what will those be stored in? I was thinking of using a map with keys or an enum for readability so you can access the streams using that. So you'll register
I haven't tried it out but I am thinking about it, the same with the Future viewmodel. Multiple Futures and cancel / timeout / retry functionality built into it. I'm writing today, hoping I can get the written done and the video in one day for the new tutorial series episode 1. I'll be improving this package as we're developing a new food delivery service customer app so It'll get constant updates and fixes over the next few weeks. |
Pushed base implementation. We'll refactor as we find better ways of doing things or the requirements change. Thanks for all the effort |
How would you implement multiple streams with the
StreamViewModel
currently? I would imagine combining and transforming streams to get multiple types out of them could get tedious.My two cents:
I would think the best implementation would be the way you set up Provider previously:
providers = [ ..._independentServices, ..._dependentServices, ..._consumableServices, ];
Maybe it would it make sense to have something like this:
Where the
StreamsMixin
does the same thing that theStreamViewModel
does. Does that make sense? If I'm missing something and this is already doable, then an example of multiple streams would go a long way. Thanks!The text was updated successfully, but these errors were encountered: