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:
Erik K
2019-01-19 02:41:46 +02:00
committed by Tom
parent d38355c940
commit e80a1625dd

View File

@ -34,7 +34,7 @@ This also works the same way in functional components:
// in functional components, props will be received as a parameter 'props' // in functional components, props will be received as a parameter 'props'
const Header = (props) => { const Header = (props) => {
return ( return (
<Text>{props.title}</Text> <Text>{props.text}</Text>
); );
}; };