Welcome to the Treehouse Community
Looking to learn something new?
Bartlomiej ZabielskiCourses Plus Student 10,363 Points
Why are we using the map index instead of player.id?
Curious why we used index to update the player score instead of the player id? Is it because it makes updating the state easier? If we used the player id we would then need to right a filter function to ensure we are updating the right score but with index we can just do the prevState.players[index] += delta