Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRuell Magpayo
508 Pointsaccessing "score" directly from state as a member of Player allowed?
in 2:32 in function handleScoreChange(), is it allowed to access and change the score inside the players array this way, how come? score is not an item in the state but a member in the players array, so my confusion is from this part. Is there any additional reading about this?
Peter Mingione
10,568 PointsPeter Mingione
10,568 PointsI have the same question. How does the setState method in the handleScoreChange method know which score to change in the player's array?