The End of LiveData
?!?
LiveData
has been around for a few years as the official Google reactive API solution.
Nowadays, LiveData
is still the official Google reactive API solution… for Java.
For Kotlin developers, Google is starting to steer you towards StateFlow
. StateFlow
is very similar to LiveData
, but it is more tightly tied into the world of coroutines. It offers greater power and flexibility, but it is only practical for use in Kotlin projects.
We will see StateFlow
— and a similar construct, SharedFlow
— later in the book.
Prev Table of Contents Next
This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.