Good afternoon, I'm in a project where I have to use Redux for the status of my application in Meteor , but when handling a reduced type object I had to use > ImmutableJs where when using the .set property to change the value of a key of this type:
const stateMenu = {
menu0: {
nombre: 'Adm de PBX',
activo: false,
abierto: false,
habilitado: true,
iconItem: "fa fa-server"
},
menu1: {
nombre: 'Video Conferencia',
activo: false,
abierto: false,
habilitado: true,
iconItem: "fa fa-video-camera"
},
}
The reducer has this style
export function menu(state = map(stateMenu), action) {
switch (action.type) {
...
}
}
The return of a switch case
return state.set('menu0.abierto', true);
it does not work for me like that
return state.menu0.set('abierto', true);
could you help me see how to change the value of the second level objects of the stateMenu with immutablejs
Thanks.!