'How to pass data from one component to another component in React.js?
I need help regarding the react code. I am displaying the tree view. Clicking on the tree nodes will open the component in the right.
I am successfully able to open the components on Tree nodes Click. I am doing it through routing. Please find the code in the github: https://github.com/sdalal/treeapp.
Please help me how to pass the node information from Home.js to Add_Category.js.
I need to pass the node information to all the components. I am doing the tree routing in Home.js. Home.js component displays the tree and routing.
In Add_Category, I need the node information that is going to be used by WebAPI getBusinessTypeName(ID). ID is the selected node id of the tree. Please help me how this can be achieved. On click of Service node, it opens/routes to a component Add_Category. Please help me how to pass node id of service to Add_Category component that I need to use in WebAPI. PLease help.
-Service Add_Category -Test1 -Test11 --Test111 -Sales -Test2 -Test3 -Test4
Thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source | 
|---|
