Skip to content

Store: strict mode #201

@azu

Description

@azu

Vue

In strict mode, whenever Vuex state is mutated outside of mutation handlers, an error will be thrown. This ensures that all state mutations can be explicitly tracked by debugging tools.
-- https://vuex.vuejs.org/en/strict.html

Mobx

Usage: useStrict(boolean). Enables / disables strict mode globally. In strict mode, it is not allowed to change any state outside of an action. See also extras.allowStateChanges.
-- https://github.com/mobxjs/mobx/blob/gh-pages/docs/refguide/api.md#usestrict

Almin allow to mutate state inside of constructor and receivePayload.
This strict limitation provide as strict option?


Edit: 2017-07-21

Almin 0.13 can use strict mode

const context = new Context({
    dispatcher: new Dispatcher(),
    store: storeGroup,
    options: {
        strict: true
    }
});

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions