nav Graph View Model
Deprecated
Use rememberNavGraphViewModel instead
Replace with
import org.kodein.di.compose.android.navigation
rememberNavGraphViewModelGets an instance of a VM as an android ViewModel, scoped on a NavGraph, for the given tag.
VM generic will be preserved!
Return
An instance of VM.
Parameters
The type of the ViewModel to retrieve.
The bound tag, if any. If changes during composition, a new instance will be created.
Throws
If no provider was found.
If the value construction triggered a dependency loop.
Deprecated
Use rememberNavGraphViewModel instead
Replace with
import org.kodein.di.compose.android.navigation
rememberNavGraphViewModelGets an instance of a VM as an android ViewModel, scoped on a NavGraph, for the given tag.
VM generic will be preserved!
Return
An instance of VM.
Parameters
The type of the ViewModel to retrieve.
The bound tag, if any. If changes during composition, a new instance will be created.
The type of argument the returned factory takes.
The type of argument the returned factory takes.
A function that returns the argument that will be given to the factory when curried. If changes during composition, a new instance will be created.
Throws
If no provider was found.
If the value construction triggered a dependency loop.