CodandoTV / StreamPlayerApp

project created for the community as an example of modern structure/architecture and technologies to a real world
https://www.youtube.com/c/CodandoTV
Apache License 2.0
53 stars 17 forks source link

Add New LifecycleEffect #97

Open rviannaoliveira opened 10 months ago

rviannaoliveira commented 10 months ago

After the Lifecycle update, a new way of handling lifecycle in Compose was introduced

https://developer.android.com/jetpack/androidx/releases/lifecycle#2.7.0-rc02

like:


@Composable
fun HomeScreen(viewModel: HomeViewModel = viewModel()) {
  LifecycleEventEffect(Lifecycle.Event.ON_RESUME) {
    viewModel.refreshData()
  }
  // …
}