Skip to content

Instantly share code, notes, and snippets.

@kazagkazag
Last active July 7, 2016 13:42
Show Gist options
  • Save kazagkazag/164518f80eafc2b4142e006ef12be65e to your computer and use it in GitHub Desktop.
Save kazagkazag/164518f80eafc2b4142e006ef12be65e to your computer and use it in GitHub Desktop.
class MyComponent extends Component {
render() {
return <main>Awesome component</main>;
}
}
MyComponent.propTypes = {
count: PropTypes.number.isRequired,
items: PropTypes.arrayOf(
PropTypes.shape({
id: PropTypes.number,
title: PropTypes.string,
isRegisterd: PropTypes.bool
})
)
};
MyComponent.defaultProps = { count: 0 };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment