pangea-poker icon indicating copy to clipboard operation
pangea-poker copied to clipboard

Refactor state object

Open norbertdragan opened this issue 5 years ago • 0 comments

The shape of the state object (defined in initialState.tsx) is getting a little bit out of control, it might be a good idea to refactor it.

For example, we could use this shape:

const initialState = {
  connections: {
    nodes: {..},
    nodeType: "dcv",
    message: {..},
    ..
  },
  game: {
    players: {..},
    minRaiseTo: 100,
    ..
  },
  account: {
    settings: {
      controls: {canCheck: false, ..},
      isMuted: false,
      ..
    },
    balance: 100,
    isDeveloperMode: false,
    ..
  }
};

norbertdragan avatar Feb 10 '20 03:02 norbertdragan