You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.
I'd like to say that I feel the jump to 1.0.0 stable was rushed.
As for the bug
Argumentoftype'{ dispatch: NavigationDispatch<any>; state: NavigationState; addListener: any; }'isnotassignabletoparameteroftype 'NavigationProp<NavigationState,NavigationStackAction>'. Object literal may only specify known properties, and 'addListener' does not exist in type 'NavigationProp<NavigationState,NavigationStackAction>'.
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: