ow-prop-type
React prop-types validation with ow
- when
process.env.NODE_ENV
is'production'
it will be a shim function - it exports the
ow
object (or shim in'production'
) as a property - will return the unprocessed
ArgumentError
Why
prop-types has only very basic validation, and it is super verbose to add custom validators.
Example
Component static propTypes = // propType with a predicate total: // propType with a callback, must return a predicate current: