That completes our lesson on props. Great job sticking with it!

Here are some of the skills that you have learned:

  • Passing a prop by giving an attribute to a component instance
  • Accessing a passed-in prop via this.props.prop-name
  • Displaying a prop
  • Using a prop to make decisions about what to display
  • Defining an event handler in a component class
  • Passing an event handler as a prop
  • Receiving a prop event handler and attaching it to an event listener
  • Naming event handlers and event handler attributes according to convention
  • this.props.children
  • getDefaultProps

That’s a lot! Don’t worry if it’s all a bit of a blur. Soon you’ll get plenty of practice!

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?