David Weldon David Weldon - 11 months ago 93
React JSX Question

React prop validation for date objects

What is the currently preferred way to validate a

prop in react?

Right now I'm using:

This, however, is now failing the forbid-prop-types lint rule. Should I use a
or is there some better way?

Answer Source

Pretty sure you could use React.PropTypes.instanceOf(Date)