Function mapWritableState

  • Same as mapState() but creates computed setters as well so the state can be modified. Differently from mapState(), only state properties can be added.

    Type Parameters

    Parameters

    Returns _MapWritableStateObjectReturn<S, KeyMapper>

  • Allows using state and getters from one store without using the composition API (setup()) by generating an object to be spread in the computed field of a component.

    Type Parameters

    Parameters

    Returns {
        [K in Keys]: {
            get: (() => S[K]);
            set: ((value) => any);
        }
    }

Generated using TypeDoc