React validate validation for date objects

What is the currently preferred way to test for Date prop support?

Now I'm using: React.PropTypes.object

This, however, no longer complies with the la forbid-prop-types rule. Should I use shape or is there a better way?

+49
reactjs
Sep 21 '16 at 22:33
source share
1 answer

Pretty sure you can use PropTypes.instanceOf(Date)

+121
Sep 21 '16 at 22:36
source share



All Articles