Skip to content

Instantly share code, notes, and snippets.

@jasonlucas907
Created December 7, 2017 20:32
Show Gist options
  • Save jasonlucas907/79628d1e626589c0e8556d9fb420091a to your computer and use it in GitHub Desktop.
Save jasonlucas907/79628d1e626589c0e8556d9fb420091a to your computer and use it in GitHub Desktop.

Proptypes

Install PropTypes

-npm install prop-types —save

Import to project

import Proptypes from ‘prop-types’

Example:

componentExample.proptypes = {
	name: Proptypes.string.isRequired,
	isConfirmed: Proptypes.bool.isRequired
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment