Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
I ran into some flow issues. I filed facebook/flow#5483 against the flow team asking them to make it easier to isolate individual files to be flow checked from the
Their suggestion is:
"Instead, react-navigation should include it's type definitions in the flowtype/flow-typed repository, where they can be versioned by the library version and by Flow version."
Just filing this as a FR here -- thanks!
Yeah, we’re aware. Four thoughts:
For now I’m gonna close this issue, but I welcome continuing discussion, and I think our answer to this will very possibly change in the future (if and when
I ended up here after googling the sh**t out of flow, flow-typed, react-navigate and I eventually looked for a type definition for navigate so here I am. I comment here since it's been updated fairly recently, my apologies if it's not the right place to do so.
Now I'm having issues with partially typed States and Props which are impossible to solve.
The weird thing is:
Which also doesn't work with relative imports. So it seems like flow and react-navigate had a fight, and I'm not good at couple counselling.
About versions: npm ls --depth=0 gives me:
The unmet dependency is apparently due to react-native-maps who's looking for react-native 0.51, I didn't bother since it works fine as is. And I use yarn v0.27.5, node v8.4.0, dont know what else could be useful?
Any help on this would be gratefully received.
I don’t know why that’s happening. Something must be incorrectly configured, since it should be possible to import directly from that file. I’m guessing something is wrong with your .flowconfig. I’ve only tested .flowconfig from React Native projects (
You should be able to import directly from
Finally got it to work... So:
now I have the "No errors" message and I can import types! Very happy with this, thanks for getting back to me on this one!
In talking to @satya164 I realized that reason #2 above is not actually true. Since Flow versions correspond to React Native versions, we can upload types for each individual Flow/RN version to
I've reopened this issue to track. I don't have the cycles right now to do this, but might in the next couple of months. If anybody is interested in addressing this, please let me know!