PracticaDS / pdes-tp-team_prog

Pdes-tp-team_prog
0 stars 0 forks source link

Change gameState property name in GameState reducer #70

Closed LaimeJesus closed 5 years ago

LaimeJesus commented 5 years ago

gameState is a confusing property name in the GameState reducer because It's already inside in the gameState object.

const initialState = {
  gameState: STATES.PAUSED,
  machineSelected: null,
  currency: 0,
  tick: 0,
}
...
export const GameState = (state = initialState, { type, body }) => {
  const handler = ACTION_HANDLER_TYPES[type]
  return handler ? handler(state, body) : state
}

It should be named status or state