https://kotlinlang.org logo
Title
z

ziv kesten

10/17/2020, 1:54 PM
Is there a way to pass events from websocket to view model without RxJava and callback? RxJava is just to big to implement in my project just for this need. Flow is still not ready for production (is it?) And liveData does not seem like a good fit (no need for lifecycle awareness in this case)
z

Zach Klippenstein (he/him) [MOD]

10/17/2020, 2:45 PM
Flow is definitely ready for production.
❤️ 1
z

ziv kesten

10/17/2020, 2:48 PM
That's great news! That was definitely my preferred method, Is there a reason Android studio forces me to anotate it with "FlowPreview" an "Experimental coroutines api"?
z

Zach Klippenstein (he/him) [MOD]

10/17/2020, 3:01 PM
Some of the flow APIs are still experimental, but "experimental" means the API is likely to change at some point in the future, not that it's not ready to use. It's more for library authors who need to know they can't rely on them for backwards-compatible ABI. And some things, like the StateFlow interface, are stable for use but experimental for implementing yourself.
z

ziv kesten

10/17/2020, 3:06 PM
Thank you for this complete answer 🙏🙏