Edit: I was wrong. I mistook flow for proptypes (2am replying lol). Anyway, guy replying to this sums it up right. But, personally I stick to typescript simply because its more widely supported (easier to ask solutions for) and Microsoft does a good job updating it (great documentation too). And frankly, a bit of a C# fan here.
After using both on a react project before, I lean more towards typescript. It reads much better as a programming language compared to flow's hybrid approach with keywords and comments. Also flow's static type checking is runtime compared to typescript's compile time which is much better at detecting problems earlier. Lastly, flow's limited to react so if you use other js based libraries you'll still switch to typescript for ur static typing needs
Programming languages enthusiast. Author of Learn Type Driven Development: https://www.packtpub.com/application-development/learn-type-driven-development
Unless I'm very mistaken, this is not correct regarding Flow.
Flow types are stripped out at runtime; it is checked using an ongoing language server (which in practice is how Typescript is generally checked), and it isn't React specific any more than Typescript is Angular specific. In both cases they're just ways for specifying types on top of Javascript, and all support for libraries just comes from type definitions someone else has written up.
The main difference between the two is that Typescript is more popular so has a much better pool of prewritten typedefs for external libraries.
(p.s. Thinking about the specifics of what you've said, are you thinking of prop-types? Because Flow is a separate thing, much closer to TS than it is to prop-types.)
My mistake. I was thinking of prop types! You're right about all of those. I mistakingly interchanged them (was replying to this at 2 am). Thanks for correcting me.
Edit: I was wrong. I mistook flow for proptypes (2am replying lol). Anyway, guy replying to this sums it up right. But, personally I stick to typescript simply because its more widely supported (easier to ask solutions for) and Microsoft does a good job updating it (great documentation too). And frankly, a bit of a C# fan here.
After using both on a react project before, I lean more towards typescript. It reads much better as a programming language compared to flow's hybrid approach with keywords and comments. Also flow's static type checking is runtime compared to typescript's compile time which is much better at detecting problems earlier. Lastly, flow's limited to react so if you use other js based libraries you'll still switch to typescript for ur static typing needs
I would recommend editing this comment to retract it, because people inevitably will not read replies :-)
Done
Unless I'm very mistaken, this is not correct regarding Flow.
Flow types are stripped out at runtime; it is checked using an ongoing language server (which in practice is how Typescript is generally checked), and it isn't React specific any more than Typescript is Angular specific. In both cases they're just ways for specifying types on top of Javascript, and all support for libraries just comes from type definitions someone else has written up.
The main difference between the two is that Typescript is more popular so has a much better pool of prewritten typedefs for external libraries.
(p.s. Thinking about the specifics of what you've said, are you thinking of prop-types? Because Flow is a separate thing, much closer to TS than it is to prop-types.)
My mistake. I was thinking of prop types! You're right about all of those. I mistakingly interchanged them (was replying to this at 2 am). Thanks for correcting me.
No worries, we've all been there 😁
Hmm thanks alot this helped