First, let's talk about what is Flow or FlowType...
From their official site -
From ReactJS's site-
Seems fair 👌
If you already used Flow, then you know that in a few cases in your code, Flow is not happy though you think your code is fully okay and should not be modified to make Flow happy.
But as Flow is not happy with that code, the build will break. 😱
So, to bypass the Flow error, we have to add
$FlowFixMe before that specific line. 😐
And if you are working with a big codebase, then you probably need to add this thing a lot in a lot of places. 😞
Like, if we go to ReactJS GitHub repo and search for
$FlowFixMe in the whole repo, we will find a lot of them in the codebase.
I think, that
$FlowFixMe should be
Now, let's talk about what Facebook is doing to make Flow better.
Actually, they are even removing Flow from their own projects and migrating their codebase to TypeScript.
One of the popular Facebook tools is JEST.
They used Flow on the Jest codebase. Now they have migrated and started using TypeScript.
So, as Facebook developers are also removing FlowType from their projects, what do you think about it?
Do you wanna use it for your projects or remove it?
Do you think they will make it better?
I will provide some reference URLs for you guys to look more-
(Apologies if this isn't appropriate usage of the issue tracker, feel free to close if so.)
Jest (another Facebook project) has recently announced they're planning on migrating their codebase from Flow to TypeScript: https://github.com/facebook/jest/pull/7554
Quite surprised to see that decision go through, as I would have expected Facebook to just veto it for the obvious reason of internal cohesion/support between its own projects.
I'm personally more of a fan of Flow's approach of favouring correctness. A lot of my confidence in continuing to use Flow in my projects is that it's backed by Facebook's usage for its own projects (React, RN, Relay, Metro etc). But given that there's seemingly no opposition to a FB project, not even just being started in TS but being actively rewritten off of Flow, it brings this view into question. And of course, the linked issue is now being paraded all over HN, Reddit, etc, raising further FUD against Flow.
Is there any chance someone on the Facebook team could outline the company's long term plan for type system usage? Is Jest somehow an exception, and React/RN/Facebook's own internal codebases etc are firmly committed as Flow projects? Or is Facebook internally beginning to consider migrating away? From what I understand, every change to Flow's codebase has to be approved by someone employed by Facebook, so having an idea of how much attention FB will be directing towards Flow seems fairy crucial to understanding its long term prospects.
And I guess a further question is whether Flow is planning on prioritising the main issues people keep bringing up when discussing reasons to migrate away (support for 3rd party type definitions, stability of the type checker).
To see FlowFixMe search result in ReactJS reop, 👉 Click here
To see HackerNews Thread 👉 Click here