Created
April 1, 2021 08:16
-
-
Save mathieu-anderson/ea6d115c86f6740a4bd41e9dfccd688a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// React components are declared as functions | |
// And can be assigned to variables (treated as values) | |
const Component = () => { | |
return <div>A first-class function</div> | |
} | |
function App() { | |
// They also can be the return value of another function | |
// Treating them like data | |
return <Component /> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment