{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

ViewModelStoreOwner

interface ViewModelStoreOwner


A scope that owns ViewModelStore.

A responsibility of an implementation of this interface is to retain owned ViewModelStore during the configuration changes and call ViewModelStore.clear, when this scope is going to be destroyed.

See also
ViewTreeViewModelStoreOwner

Summary

Public properties

ViewModelStore

The owned ViewModelStore

Public properties

viewModelStore

val viewModelStoreViewModelStore

The owned ViewModelStore