I've been using and loving Flow in my current work project. I'm trying to incorporate it into all the things.
A new 'flow-typed' repo opened up (https://github.com/flowtype/flow-typed) similar to Typescript's DefinitelyTyped repo. Was wondering if anyone wanted to make or already had a definition file for react-router to contribute before I'm forced to build my own.
As the main routing library in react, it would be nice to have this.
I feel like we'd be better off having our Flow definitions in this repo, if applicable, and actually using Flow.
I recall that Redux used Flow at one point, but I see that it got stripped out. @reactjs/redux: what were the issues there?
Would this cause any issues with Typescript users? I know they have a similar central repo of type mappings for various libraries, but I'm not a user, so I don't know how these things interact.
I don't think so. Flow bindings go under src/, but they're stripped out of the transpiled code. Can you find commit/discussion where Flow types were stripped from Redux though?
Given the similarities between Flow and TypeScript, does anyone know if there's a way to generate support for both via one set of annotations?
You should bring that question up on the Flow types repo.
It looks like the concerns there are about not wanting to offer a public API with respect to Flow types. Given that the whole idea of adding type annotations would be to offer a public API, I don't think those concerns are relevant here.
cc @gaearon
+1 for submitting flow definitions to the flow-typed repo.
Meanwhile you can use iflow-react-router https://stackoverflow.com/questions/37513785/flow-react-router-required-module-not-found/37622770#37622770
Looks like there's a PR for this at flowtype/flow-typed#284
Most helpful comment
+1 for submitting flow definitions to the flow-typed repo.