Types
Are tools like Flow or writing in TypeScript worth it? Time will tell!
Initial impressions are that the extra thought and care results in a longer initial development time, but the extra confidence in your code is worth it!
Typescript vs Flow
- Typescript has more tooling and IDE support, more popular
- Flow has less tooling and IDE support, but still backed by FB
- Typescript requires more formal annotations of types
- Flow has more emphasis on flexible type inference, more “normal” JS
- Typescript adds features to the language that transpile
- Flow is more vanilla JS, without adding or changing anything.
- Typescript is hard to integrate into React and Redux
- Flow is specifically built for React
Pitfalls
Semantic versioning on @types no longer applies – it is basically impossible to not change the API when changing @types, so even a “bugfix” can become backwards incompatible.
Home | Go back | Next up