Typesscript adds a lot for validating types.
Does it eliminate the need for using PropTypes?
Or do PropTypes still add value in some way?
Typesscript adds a lot for validating types.
Does it eliminate the need for using PropTypes?
Or do PropTypes still add value in some way?
Difference between them are that TS
checks at compile time and PropTypes
at runtime. If you want to be safer you can compile TS
to PropTypes
with https://github.com/milesj/babel-plugin-typescript-to-proptypes, in this case, you will have both of them but will write types only once.