JavaScript React Components Managing State and Data Flow Update the Players State Based on Previous State

Daniel Dayton
Daniel Dayton
3,377 Points

Is there any issue with using prevState.players.push(newPlayer)?

Seems to be working for me, but not sure if there is an issue doing it this way in React.