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 trialYoan Herrera
21,137 Pointsis there a reason why we don't use preState inside the AddPlayerForm but we use it everywhere else in the app??
is there a reason why we don't use preState inside the AddPlayerForm but we use it everywhere else in the app??
Is it because we are not performing a calculation based on a previous state?
when is it ideal to use prevState and when is not??
1 Answer
Sebastiaan Hols
19,520 PointsIt's in the next video...
Yoan Herrera
21,137 Pointsyes. I kept watching and saw that they fix it in the next video. i had a lot of troubles on Redux section. the course files have a lot of broken old dependencies. was hell to get it to work.
thomas shellberg
11,594 Pointsthomas shellberg
11,594 PointsI was asking myself the same thing because we should be treating State is if it were immutable.
This might be ugly but it works for me: