Skip to content
Advertisement

The action ‘NAVIGATE’ with payload {…} was not handled by any navigator

So I’m building an app where i send notification to the user when there’s an update. Once the user receives it, on clicking, I want to navigate to a specific screen in my app.

The problem is, to do that I have to use a navigation reference to be able to access the navigation object. I did read the doc, but once applying it I get the following error:

JavaScript

RootNavigation.js:

JavaScript

App.js:

JavaScript

AppNavigator.js:

JavaScript

FolderNavigator.js:

JavaScript

Directory structure:

enter image description here

Advertisement

Answer

This line RootNavigation.navigate('HomeScreen', { userName: 'Lucy' }) is causing the error, because when setting up your navigation, you didn’t name any screen HomeScreen, I’m talking about Stack.Screen‘s name property and Drawer.Screen‘s name property.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement