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
To manage an input field's state, we need to build a "controlled component." A controlled component renders a form element whose values are controlled by React, with state.
Resources
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
data in the scoreboard app, let's keep it
going by adding players to the scoreboard.
0:00
We'll create a form with a text field for
naming a new player and
0:02
a button that will add
the player on form submit.
0:07
As you'll learn,
form elements in React work differently
0:10
than regular HTML form elements.
0:15
We'll start by creating a new
component named AddPlayerForm.
0:18
Let's create a new file in our
project named AddPlayerForm.js.
0:23
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