Examples of using Arrow-Fx :arrow: on Android <https://github.com/LordRaydenMK/Android-Fx-Examples>...
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