I understand how to update some attributes in the state in redux but, is this good practice if I want to update the WHOLE state? I could obviously copy the current state and modify each attribute of that copy but for objects with a lot of attributes this would be quite time consuming.
const gameReducer = (state:IGame, action: any) => {
switch (action.type) {
case "GAME_STARTED":
return action.payload;
default:
return initialState;
}
};
export default gameReducer;