Good! You’ve defined a new method on the
Talker component class. Now you’re ready to pass that function to another component.
You want to pass
talk from here to
If you want to pass any prop to
<Button />, that means that you need to give
<Button /> an attribute. Let’s start there.
Talker‘s render method, give
<Button /> the following attribute:
During the next two checkpoints, you’ll replace those values with the values that you need! Keep them as
"bar" for now.
Your goal is to pass
<Talker /> to
prop name should you choose?
It doesn’t really matter!
Since you’re going to pass a function named
talk, you might as well use
talk as your name. Inside of the render method, change your attribute name from
What should your
prop value be?
prop value should be the information that you want to pass! In this case, you want to pass the method named
Inside of the render method, change your attribute’s value to