psteiger / flow-lifecycle-observer

A plugin for collecting Kotlin Flow in an Android Lifecycle-aware manner.
MIT License
57 stars 7 forks source link

Advocate for `repeatOnLifecycle`? #7

Closed p-lr closed 3 years ago

p-lr commented 3 years ago

Hi @psteiger,

Jose Alcérreca has posted an article about Flows and LiveData, and at the end he describes the rationale behind repeatOnLifecycle, which is exactly the purpose of what we've done here.

repeatOnLifecycle is part of lifecycle-runtime-ktx 2.4.0-alpha01 (so still alpha for the moment). We could mention that in the readme, but it's your call.

psteiger commented 3 years ago

@peterLaurence you are correct.

I will update the README and my medium article to note Google now offers an official solution to this use-case.

Thanks for noticing and reporting!