Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
In my project I want to render the dish details(from DishDetail component) upon clicking the image(MenuComponent) using onClick.

Link to my sandbox: vigorous-austin-5l1p5 - CodeSandbox[^]

What I have tried:

Since, I'm new to the coding community I couldn't do much apart from referring the online course material and google which didn't help me much. Pls help me.
Posted
Updated 31-Jan-21 6:15am

1 solution

 
Share this answer
 
Comments
Wajid Ansari 31-Jan-21 12:37pm    
I've verified the onClick function from react documentation and it according to it my code seems to be fine.
I'm trying to render the dish details(from DishDetail component) upon clicking the image(MenuComponent). Maybe I'm doing something else wrong?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900