2 ms·
I'd just like to voice a -1 for TypeScript (or Flow for that matter) In my experience it doesn't help people, especially at an earlier stage, but rather clutte
by gpmcadam 8y ago
I'd just like to voice a -1 for TypeScript (or Flow for that matter)
In my experience it doesn't help people, especially at an earlier stage, but rather clutters what people already know about JavaScript. It causes tooling to slow down and ultimately doesn't prevent bugs that could not already be caught by good design and linting.
I'm much more of a fan of something like PropTypes, which isn't just superficial, but actually runs on your code in all places and will stop you passing the wrong types to components, regardless of what environment you're in.
Otherwise everything else on this list is a +1
- simplify 8y agoTypeScript has been very helpful in our react projects. There isn't much clutter, as usually the only types you define are props and state – things you want to know anyway. TypeScript doesn't prevent any bugs that tests would not, but it does so faster and more concisely. Tooling slowdown depends on your tooling setup; TypeScript can compile JSX on its own. PropTypes are useful if you're transitioning from a plain JS codebase. But if you can start with and go full TS, I highly recommend going that route.