Closed SEUH closed 6 years ago
Sorry, the docs are a little out-of-date. Updating them is on my to-do list.
Are you using the new export initializeListeners
? Call it in your top-level component's componentDidMount
'. If that doesn't work, try using createNavigationReducer
to construct your reducer (it wraps your navigator, and returns a navigation reducer to be called by your master reducer).
If neither of those solve the issue, then yes unfortunately I'll need an Expo Snack that reproduces the issue so I can investigate on my end.
I included createNavigationReducer to create my reducer and called initializeListeners in my main app component but that doesn't change anything. I will try to 'export' my project within the next days.
I've found the problem. I had the "addNavigationHelpers" function called outside my navigations render function so it basically was only called once and caused this weird error.
Awesome! Glad you figured it out.
I have a TabNavigator inside a StackNavigator
Now i have a middleware for my redux store which basically logs me the navigation state
Current Behavior
On my android phone i swipe left (to 'points'), then i swipe right (back to 'home' (default)) which is all displayed correctly but in the navigation state, it says that the tabnavigator is still on index 1.
Expected Behavior
Normally the navigation state should change correctly. It only doesn't change if i swipe to the "home" (default) tab.
How to reproduce
I use ignite but i did the Redux Integration 'tutorial' (also altered the ignite base code to the correct one in the tutorial) and logged me the navigation state. If there's a need for a replication app i can do one, but it will take some time.
Your Environment
Am i missing something here?
Update 1:
Further investigation with reactotron shows that the navigation state really doesn't change when i swipe to the 'home' tab (but every other navigation works, it's just the 'home' tab (index 0))