Skip to content

Instantly share code, notes, and snippets.

@rxluz
Created December 18, 2017 21:14
Show Gist options
  • Save rxluz/f54ee12e510001df278ab4c476eb7449 to your computer and use it in GitHub Desktop.
Save rxluz/f54ee12e510001df278ab4c476eb7449 to your computer and use it in GitHub Desktop.
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