Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 333 Bytes

README.md

File metadata and controls

15 lines (12 loc) · 333 Bytes

ScopedViewModel

Scoping ViewModel to a @Composable function example

Usage

Add this files to your project and then call scopedViewModel() or rememberScoped() fun if you need a scoped ViewModel

@Composable
fun YourFunction(
  viewModel: YourViewModel = scopedViewModel()
) {
  /*use your scoped viewModel here*/
}