jumpn/utils-graphql

react-native projects choke on Flow types

Closed this issue · 2 comments

My team uses https://github.com/absinthe-graphql/absinthe-socket in a React Native context. We updated to the latest release on that repo and started getting errors related to the Flow types in this sub-dependency (we use Typescript instead of Flow). What is the best way to strip out/ignore the Flow types introduced here? Maybe there's a babel transform that should be added as a peer dependency here to prevent such errors in a React Native context?

Hi @southerneer,

You should do exactly as you described but with the only caveat of setting @babel/preset-flow under a babel overrides section entry matching this (or other) package that use flow.

Update: this became a moot point with the latest react-native version (0.58.0 as of writing)...probably because metro-react-native-babel-preset handles flow types by default (?)