Skip to content

Instantly share code, notes, and snippets.

@ricexen
Created September 12, 2019 17:05
Show Gist options
  • Save ricexen/c906af00814eb403c3744ab83836d2b8 to your computer and use it in GitHub Desktop.
Save ricexen/c906af00814eb403c3744ab83836d2b8 to your computer and use it in GitHub Desktop.
import PropTypes from 'prop-types'
const Component = ({children}) => <div>{children}</div>;
Component.propTypes = {
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),
PropTypes.node
]).isRequired
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment