top | item 18173324

(no title)

eclectric | 7 years ago

Just completed a chapter on PropTypes. While useful, they seem to be an excessive and tedious. Can't we somehow leverage TypeScript for the model validation instead?

discuss

order

baddox|7 years ago

TypeScript, Flow, and ReasonReact all support defining types for props. React PropTypes are completely optional and only give warnings in development, so I you’re using a language or language extension with compile-time type-checking you shouldn’t need PropTypes.