Created
November 4, 2020 17:36
-
-
Save mimnets/e78abb7670942b4a6b71cb1e192d098e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
// Correct! This is a component and should be capitalized: | |
function Hello(props) { | |
// Correct! This use of <div> is legitimate because div is a valid HTML tag: | |
return <div>Hello {props.toWhat}</div>; | |
} | |
function HelloWorld() { | |
// Correct! React knows <Hello /> is a component because it's capitalized. | |
return <Hello toWhat="World" />; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment