Closed jbrodriguez closed 6 years ago
It seems like this issue has to do with react-navigation
as a whole, rather with the Redux integration specifically. It has to do specifically with the type of Navigator
, which is defined in the main react-navigation
package, including the definition of the navigation
prop which is used for Redux integration. (The same navigation
prop is used for nesting navigators.)
More generally, this question is about figuring out a way to maintain a TypeScript libdef as we iterate on the library. (We have a pipeline in place for this for Flow, but not for TypeScript right now.)
Please post this issue on the main react-navigation
issue tracker so it can get the appropriate eyeballs. I have some thoughts and advice, feel free to tag me in the post! :)
I'd like to say that I feel the jump to 1.0.0 stable was rushed.
As for the bug
comes from
since https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-navigation/index.d.ts isn't up to date.
Since I create the store in a separate file from the creation of the Navigator, I had to define an instance property (this.addListener), so that it's created after the redux middleware.