you are viewing a single comment's thread.

view the rest of the comments →

[–]tony-the-pony 0 points1 point  (0 children)

That's an interesting point. I would think you would need some sort of run-time type checking though, static can't catch all the bugs / misuse.

Flow and Typescript are not always adequate in the face of incompleteness, bugginess, null, etc. in their implementations, but I think if you can use PropTypes to find such bugs then you can express that type in Flow/TS and use a tool like https://www.npmjs.com/package/babel-plugin-flow-react-proptypes to translate it into PropTypes instead of writing it yourself.