React-native "console.error" the action "NAVIGATE" with payload was not handled by any navigator

after implementing nesting navigator I am getting error in dishdetail it is not getting render I followed documentation and tried this
onPress={()=> navigate({name: ‘Dishdetail’ , params: { screen: “Dishi” , dishId:}})}
but still error

Hello there.

It might be more useful to see your relevant code…

error line is present in res-native/components/menucompo.js

nesting of navigation done in res/native/components/maincompo.js

The link to your code isn’t working . My best guess is that you haven’t defined ‘Dishdetail’ in your Stack Navigator.

The link here shows an example of how to do so

@pschorey is correct. You are passing the name: 'Dishdetail' to the navigate function, but have the Screen defined as: 'Dish detail'.

Also, I suspect you will have issues beyond that of not passing any props to renderMenuItem.

Hope this helps

very sorry for damaged git repo Pls check rep i have updated

(1)— onPress={()=>navigate(‘Dishdetail’, { dishId: })};
const {navigate}=this.props.navigation;

before adding nesting navigation of stack and drawer it(1) was navigating me to Dishdetail something is wrong with screen definition only.

i don’t think something wrong with props just in this
onPress={()=>navigate(‘Dishdetail’, { dishId: })}
some definition is yet to made for screen.

You’re still using “Dishdetail” instead of the name you’ve defined (“Dish detail”)

@DanCouper @Sky020 @pschorey can anyone complete for code line for screen defination in maincomponent because i have used both navigator so facing problem.
my whole learning is stuck help.

We are reluctant to just give you lines of code. As far as the navigation error, it is a simple fix. So, unless you did not write the code, there is no reason our “hints” will not help. To restate the issue:

I recommend you read the docs, for more info:

I still think you will have more errors, once that is fixed. So, to pre-empt that:

Keep persevering. The more you put into trying to understand and debug the error, the more you will learn from it.

1 Like