https://kotlinlang.org logo
#rx
Title
# rx
i

iex

03/27/2020, 2:29 PM
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

Zach Klippenstein (he/him) [MOD]

03/27/2020, 4:36 PM
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

Brendan Weinstein

03/28/2020, 3:43 PM
https://github.com/nytimes/Store -- The original library was an Rx solution!
i

iex

04/03/2020, 9:42 AM
thanks!
2 Views