leoasis / redux-immutable-state-invariant

Redux middleware that detects mutations between and outside redux dispatches. For development use only.
MIT License
937 stars 37 forks source link

Does redux-immutable-state-invariant detect changes over Map<string, MyObject>? #28

Open joseucarvajal opened 7 years ago

joseucarvajal commented 7 years ago

I am mutating my mapProperty from my state, and redux-immutable-state-invariant, does not inform mutation to me. Mutating state line:

state.mapRecursosIndxByCtx.set("asdf", new ZRecursoViewModel());

mapRecursosIndxByCtx property is defined as follows:

const initialState: ZAplication.ZAplicationState = { mapRecursosIndxByCtx: new Map<string, ZRecursoViewModel>() }

It works when i try to mutate another properties but mapRecursosIndxByCtx property doesn't works.

Am i right?.

Thanks in advance.

leoasis commented 7 years ago

Hi @joseucarvajal! Unfortunately, this library does not support mutable objects other than objects and arrays, but it would be nice to support the other native ones like Map and Set. Would you like to contribute to add support for it?