Skip to content

Instantly share code, notes, and snippets.

@shorthouse
Created January 31, 2025 21:26
Show Gist options
  • Save shorthouse/dd507bbd7d796a3f931334b547ffb649 to your computer and use it in GitHub Desktop.
Save shorthouse/dd507bbd7d796a3f931334b547ffb649 to your computer and use it in GitHub Desktop.
@Composable
fun MovieScreen(viewModel: MovieViewModel = koinViewModel()) {
val uiState by viewModel.uiState.collectAsStateWithLifecycle()
MovieScreen(
movies = uiState.movies,
movieName = uiState.movieName,
onUpdateMovieName = viewModel::updateMovieName,
onAddMovie = viewModel::insertMovie,
onDeleteMovies = viewModel::deleteMovies
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment