prop.title -> prop.text (#32159)
Properties should be having the same name for the example to work. Either line 37 and line 45 are {props.text} and text="Welcome" OR {props.title} and title="Welcome"
This commit is contained in:
@ -34,7 +34,7 @@ This also works the same way in functional components:
|
||||
// in functional components, props will be received as a parameter 'props'
|
||||
const Header = (props) => {
|
||||
return (
|
||||
<Text>{props.title}</Text>
|
||||
<Text>{props.text}</Text>
|
||||
);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user