3 ms·
These are good points. A agree that PropTypes are neither as expressive/spesific nor as strict as using e.g. an interface with TS. I still think they are often
by erokar 8y ago
These are good points. A agree that PropTypes are neither as expressive/spesific nor as strict as using e.g. an interface with TS. I still think they are often good enough.
You are also correct to point out PropTypes offer no way of adding typing to component or utility functions. I've seldom seen errors arise from the lack of typing here, and if they do you'll usually discover them at runtime. However types as added documentation of function signatures would be nice.