3 ms·
that's impressive. What would you recommend between flow and typescript for an existing react app with an already large codebase?
by armandososa 9y ago
that's impressive. What would you recommend between flow and typescript for an existing react app with an already large codebase?
- RussianCow 9y agoI know React devs tend to gravitate towards Flow (which makes sense, since both are developed by Facebook), but I personally recommend TypeScript solely because it has a larger ecosystem and far more library type definitions. The actual type systems are pretty much identical these days, but having type definitions for almost every external library makes the out-of-the-box experience much, much better. Also, I found TypeScript very easy to integrate into an existing webpack setup, whereas I had a lot of trouble getting Flow to work seamlessly (though, apparently many others have had the opposite experience, so take that with a grain of salt).
- Zalastax 9y agoTypeScript is ahead of Flow in both tooling and type expressiveness. Both can easily be added to an existing code base in incremental steps. I'd go for TypeScript every day of the week, but both are good choices.
- ggregoire 9y agoI'm using Flow but I'd recommend TypeScript. I love Flow but TypeScript just seems to be more seriously maintained and less buggy. I've been waiting some bug fixes for 2 years (like all the object destructing and spread issues[1]), but they prioritize the Facebook private internal roadmap. I stick with Flow for now just because create-react-app doesn't support officially TypeScript, but it should be possible with the next major version that will include Babel 7. [1] https://github.com/facebook/flow/issues/2405 https://github.com/facebook/flow/issues/2405