Closed hoangpham95 closed 5 years ago
You're confusing your navigation state (stored in Redux) with the React Navigation navigation prop (provided by navigators). Redux stores generally aren't supposed to have any functions in them, so trying to call a function on your state should be a red flag to you that something is off.
You might want to start by giving the Redux documentation a read. Then give the React Navigation docs about the navigation prop a read.
Following with the newest change in react-navigation 3.x, I was unable to add listener from the main navigator.
Code:
After running this code, I got the error that
props.nav.addListener
is not a function. How should I resolve this issue?