|
|
|
|
|
by yladiz
3355 days ago
|
|
Realistically, you are going to do the same thing with TypeScript and Flow, except with different tools: with TypeScript, you'll use the transpiler, and with Flow, you'll use Babel. In technical terms they are different, sure, but in reality they're basically the same. Unless you use the comment style Flow types, you will have to run your code through some stage to remove the types. > TypeScript being a transpiler means what gets executed at runtime is not what you wrote but some other sources emitted by the TypeScript transpiler. This is also true with Flow, if you want to be technical. What you write with Flow is not valid JavaScript (with the sole exception of comment style types) but some other sources emitted by another program like Babel. If you haven't looked at TypeScript in 3-4 years, then you can't really make an informed opinion on the subject, because in that timeframe React has gone through 12 versions, Flow did not publicly exist, and TypeScript has changed significantly. It might be worth looking at TypeScript again and seeing how it compares to Flow in 2017. |
|