https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
n

Napa Ram

05/19/2021, 6:41 AM
Hi anyone is having example of LiveData used in Shared common code
n

Napa Ram

05/19/2021, 7:55 AM
Thanks @alex009
j

John O'Reilly

05/19/2021, 8:12 AM
I think recommendation though would be to use StateFlow instead of LiveData in shared code (and in fact in general) if possible
👍 1
n

Napa Ram

05/19/2021, 8:14 AM
@John O'Reilly yeah John i was going through your blog i think it better to use StateFlow
j

John O'Reilly

05/19/2021, 8:15 AM
btw, if you haven't seen it, there was nice article a few days ago about transitioning from LiveData to StateFlow etc https://medium.com/androiddevelopers/migrating-from-livedata-to-kotlins-flow-379292f419fb
2 Views