Article to know the internals of `LiveData` and ho...
# android
h
Article to know the internals of
LiveData
and how it works. 👏 https://medium.com/androidiots/how-i-made-my-own-livedata-1faf4a45520
👏 2
a
Be careful. This is not a thread safe implementation. Also, LiveData itself keep track of the value version. I suggest to look properly into internals. As per this reconstruction, it’s about halfway there I guess. Good effort 👍
h
Hey, thanks for the feedback. Yes, I intentionally did not considered the thread safety to make the article simple to understand. And versioning is also handled in the above implementation of the LiveData. I tried to implement the same
android.arch.lifecycle.LiveData
and tried to explain my mindset and how did I approach making my own LiveData. This way it becomes clear as how its internal works.