Not sure how to pass props between parent and child


#1


Stateless Components Inherit From Stateful Components
LESSON
Learn to pass props from a stateful component to a stateless component
4. Build a Stateless Component Class

All i did was alter the child.js with <h1>Hey, my name is {this.props.name}!</h1> and got the following error message
link to exercise: https://www.codecademy.com/courses/react-102/lessons/stateless-inherit-stateful-intro/exercises/stateless-component
Error message: Child should return <h1>Hey, my name is {this.props.name}!</h1>


#4

Did you tell React that the Child.js module exports a component?


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.