This repository was archived by the owner on Apr 13, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The fix
This should fix the Redux-related flowtype errors that are popping up in react-apollo due to incorrect usage of the Redux
Store
type inindex.js.flow
.The error currently appears as:
This fix is basically adding inferred types (
*
) as arguments to all references to the ReduxStore
type inside ofindex.js.flow
. This should fix #898.Additional Details
Generally you want to pass in your State and Actions as arguments to
Store
. i.e.:... but seeing as how the usage of
Store
was incorrect to begin with, and in one area, there was aStore<any>
, I figured this is a decent step forward in correctly typing this aspect of react-apollo.If perhaps this is not the right approach to fixing this flow error (i.e. maybe we want to somehow be more explicit about the Redux State and Action arguments, feel free to toss this PR out.
Cheers,
rich