Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed React Components!
You have completed React Components!
Preview
This stage we'll build the stopwatch component! We'll cover working with React's useEffect hook and learn to use conditional rendering to update your UI based on the current state.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
In the previous stage, we added two
new components to our Scoreboard app,
0:00
the Stats component and
the AddPlayerForm component.
0:00
We passed the player state down
to the Stats component, but
0:04
before we could display
the total number of players,
0:08
and the total score,
we needed to calculate their values.
0:11
We used the player's array and
0:16
the reduce method to calculate the total
number of players and the total score.
0:18
After working on the Stats component,
we created our first controlled component.
0:24
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up