this.props Recap

That completes our lesson on props!

props is quite possibly the longest and most difficult lesson in all of our React courses. Congratulations on getting this far!

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!

Community Forums
Get help and ask questions in the Codecademy Forums
Report a Bug
If you see a bug or any other issue with this page, please report it here.