Skip to content

Commit

Permalink
Show that shapes can have required properties
Browse files Browse the repository at this point in the history
  • Loading branch information
jaller94 committed Apr 12, 2018
1 parent 2bde8eb commit ba3da12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -110,8 +110,8 @@ MyComponent.propTypes = {

// An object with warnings on extra properties
optionalObjectWithStrictShape: PropTypes.exact({
color: PropTypes.string,
fontSize: PropTypes.number
optionalProperty: PropTypes.string,
requiredProperty: PropTypes.number.isRequired
}),

// You can chain any of the above with `isRequired` to make sure a warning
Expand Down

0 comments on commit ba3da12

Please sign in to comment.