useViewModelCache

Source
import { useViewModelCache } from "@prestojs/viewmodel";
useViewModelCache<ViewModelType,ResultType,SelectorArgs = any[]>(viewModel,selector,?args,?isEquals)
Source

Arguments:

ArgumentTypeDescription
*viewModelViewModelType
*selector
argsSelectorArgs
isEquals
Returns:ResultType

Examples

Basic usage

Selector with arguments