How to use the exact function from prop-types

Find comprehensive JavaScript prop-types.exact code examples handpicked from public code repositorys.

116
117
118
119
120
121
122
123
124
  optionalProperty: PropTypes.string,
  requiredProperty: PropTypes.number.isRequired
}),

// An object with warnings on extra properties
optionalObjectWithStrictShape: PropTypes.exact({
  optionalProperty: PropTypes.string,
  requiredProperty: PropTypes.number.isRequired
}),
fork icon388
star icon0
watch icon59