Skip to main content

3.12 Working With Props

Props is simply an object that gives us acces to all the attributes we pass to our own React component.

There is one slight difference in the two ways you define React components:

Added this in class components

class Person extends React.Component {
render() {
return (
<p>
I'm {this.props.name}
</p>
)
}
}