4 ms·
React is already typed with props. I see no added use for TypeScript. Yet another list of packages makes maintaining very hard and inconsistent (as types are de
by robmoorman 7y ago
React is already typed with props. I see no added use for TypeScript. Yet another list of packages makes maintaining very hard and inconsistent (as types are declared in variant ways). Explicit (and simple) functions as React (e.g. hooks) provides won't need strongly typed code, less readability in my opinion.
If you're building a library / sdk, than Typescript comes in place and can make life easier for devs.
- PunchTornado 7y agoI don't understand. How would you strongly type every function and state variable in react without typescript?
- underwater 7y agoPropTypes are disabled for production builds and runtime only. The only advantage for using them over TypeScript or Flow that I've seen is when consuming third party React components. Otherwise the guarantees, feedback loop and terseness of static types are superior to PropTypes.