Examples of using Arrow-Fx :arrow: on Android <ht...
# arrow
s
Examples of using Arrow-Fx arrow on Android https://github.com/LordRaydenMK/Android-Fx-Examples inspired by this repo about Coroutines on Android -> https://github.com/LukasLechnerDev/Kotlin-Coroutine-Use-Cases-on-Android It's still a WIP, some of the examples lack descriptions but I wanted to share..... any feedback is welcomed
😍 3
👏 1
p
I’m learning about ViewModel, I’ve been away for a while
is it recommended to kickstart business logic in the constructor, or can it be deferred to onCreate or another time?
the examples themselves are beautiful Stojan 😄
❤️ 1
s
I would not say it's the recommended way... But easiest way to guarantee it's kicked off only the first time the screen is opened and not on rotation
Isn't that
flatTap
now?
r
this is great Stojan, please don’t forget to contribute it to the blog 😍
p
flatTap
is apply IO and ignore result.
effectMap
is map a suspend function
👍 1
s
@raulraja thanks... I will add it to the Projects and examples section
@pakoito
_viewState.postValue(it)
is not really
suspended
🙈
but one would wrap
LiveData
updates in
suspended
functions
p
it’s side-effecty, it could be considered 😛
✔️ 1