Created
December 18, 2017 21:14
-
-
Save rxluz/f54ee12e510001df278ab4c476eb7449 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
import React, { Component } from 'react'; | |
import PropTypes from 'prop-types'; | |
/** | |
* This is an react component that echo an hello world | |
*/ | |
class SomeReactComponent extends Component { | |
render() { | |
return <div> {this.props.title} </div>; | |
} | |
} | |
SomeReactComponent.propTypes = { | |
/** | |
* The title of this component | |
*/ | |
title: PropTypes.string, | |
}; | |
SomeReactComponent.defaultProps = { | |
title: 'Hello world', | |
}; | |
export default SomeReactComponent; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment