Created
November 16, 2018 17:27
-
-
Save wsrast/1bcafa34fe084c9cf8d040a0be0fd913 to your computer and use it in GitHub Desktop.
Simple React functional component (super meaty)
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
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
const Functional3 = props => { | |
return ( | |
<div> | |
Hello from Functional3 and {props.name}! | |
</div> | |
) | |
}; | |
Functional3.defaultProps = { | |
name: '(Forgot the name)' | |
}; | |
Functional3.propTypes = { | |
name: PropTypes.string | |
}; | |
export default Functional3; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment