What would be a good pattern to make repositories,...
# rx
i
What would be a good pattern to make repositories, which usually just fetch data from retrofit APIs, fully reactive (i.e. offer long term subscriptions, not
Single
)? Maybe maintain
BehaviorSubject
with the API results from the last fetch, but when / how do I fetch?
z
This isn’t specifically an Rx solution, it uses coroutines’ Flow, but you can easily adapt those to Rx streams: https://github.com/dropbox/Store
b
https://github.com/nytimes/Store -- The original library was an Rx solution!
i
thanks!