Hi guys,
I would like to recommend one important thing in the exercise #2, what you have is this:
Child is going to receive a prop called name , and display that prop on the screen.
How can you make a component display a prop called name ?
To access a prop , use the expression this.props.name-of-prop .
Now, looking at this.props.name-of-prop I remember that properties containing a dash can’t be accessed via the dot notation, so, why don’t you change this and actually say:
Child is going to receive a prop called name , and display that prop on the screen.
How can you make a component display a prop called name ?
To access a prop , use the expression this.props.nameOfProp or this.props['name-of-prop'] .
So, it’s less confusing for newbies.
Regards,
Victor