loading...

re: React PropTypes vs Typescript! Any experience? VIEW POST

FULL DISCUSSION
 

This depends on how you are using PropTypes.

The official package states that you will now receive a warning if you try to use the PropTypes.{Type}(...) for runtime validation (annoying as s#!t); but then they go on to say that library checking with PropTypes.checkPropTypes(...) is available.

You can get runtime property-type checking to complement your static type checking. Honestly I think both are kind of a smell in JS.

Code of Conduct Report abuse