useImmer
A hook to use immer as a Vue hook to manipulate state.
Install
npm i @vue-hooks-plus/use-immer
npm i @vue-hooks-plus/use-immer
Auto Import
import { VueHooksPlusUseImmerResolver } from '@vue-hooks-plus/resolvers'
import { VueHooksPlusUseImmerResolver } from '@vue-hooks-plus/resolvers'
The
hook
is based onimmer
management status,immer
will be installed to ensure normal work in the projectIndependent installation
@vue-hooks-plus/use-immer
Basic Usage
Params
Property | Description | Type | Default |
---|---|---|---|
state | ShallowRef | Readonly<ShallowRef<S>> | - |
updater | - | Updater<S> | - |
Options
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
initialValue | - | () => void | any |