title: React - I need advise how to design state data structure
body: <p>I am working on cricket scoring Single page application in react. </p>
  
  <p>It is using Redux to maintain its data and with every action i will be getting a new state.</p>
  
  <p>My app has single rootReducer because everything is mingled. If a ball is thrown, batting and bowling both sides are updated.</p>
  
  <p>The state is pretty complicated but I'm of opinion that it should be like this. </p>
  
  <p>Please tell me if this state design is fine or I should somehow simplify it or change it?</p>
  
  <pre><code>var playerType = {
      id:             0,
      name:           '',
  
      // Batting stats
      runs:           0,
      four:           0,
      six:            0,
      ballsFaced:     0,
      battingNumber:  false,
      isBatting:      false,
      isOnStrike:     false,
      isOut:          false,
      outType:        '',
  
      // Batting Walkin stats
      walkInOver:     0,
      walkInBalls:    0,
      walkInTeamRuns: 0,
  
      // Batting Out stats
      walkoutWicket:  0,
      walkoutOver:    0,
      walkoutBalls:   0,
      walkoutTeamRuns:0,
      wicketBowler:   0,
      wicketFilder:   0,
      notOutPlayerId: 0,
      notOutPlayerRuns:0,
  
      // Bowling stats
      overs:          0,
      balls:          0,
      overRuns:       0,
      wickets:        0,
      isBowling:      false,
  
  };
  
  var teamType = {
      id:                 0,
      name:               "",
      runs:               0,
      overs:              0,
      balls:              0,  // This are only legal balls from 0 to 5
      isTossWon:          false,
      players:playerType  = []
  };
  
  // Initial State
  var initialState = {
      matchId:        0,
      thisOver:       [],
      prevOver:       [],
      oversTotal:     0,
      teamBatting:    teamType,
      teamBowling:    teamType
  }
  </code></pre>
  
  <p>Your thoughts?</p>