Im new in Redux and Redux concepts look weird for me at first. Let say i have an array in redux state.
const state = [
{show: false, id : '1'},
{show: false, id : '2'},
{show: false, id : '3'},
{show: false, id : '4'},
{show: false, id : '5'}
]
I want to clone this array and change/mutate one object.
I tried something like this in reducer but it did not work.
return [...state.concat(Object.assign({}, state[0], {show:true} )).slice(1,5)];
Any help or explanation would be nice.