case "CONNECTOR_CONNECTION_FULFILLED":
state = {
...state,
appState: 'loggedIn'
};
state.ourPlayer = { ...action.payload.player }
break;
So when my app fires this action, it creates a player object for my app to use. The player object has prototype methods (player.spawn(), player.killed(), etc) on it though and when I copy it this way those don't get copied.
killed. If your reducers don't modify the player state, then you should just dostate.ourPlayer = action.payload.player,