How to send data from a child component to its sibling?
I want create an app with two forms, each form in its own component. Users type in form 1, then the data will be passed to component 2. In there it will join the data of what they type in form 2. How can I do this?
Below is the code on my machine, taken from the answer from the same question in Stack Overflow. It works when using React on Stackblitz but I don't get why it's not in my machine:
The app compiles fine, but the actual result is empty.
Below is the code on my machine, taken from the answer from the same question in Stack Overflow. It works when using React on Stackblitz but I don't get why it's not in my machine:
index.jsx
index.jsxContext.js
Context.jsForm1.jsx
Form1.jsxForm2.jsx
Form2.jsxThe app compiles fine, but the actual result is empty.
Stack Overflow
I want create an app with two forms, each form in its own component. Users type in form 1, then the data will be passed to component 2. In there it will join the data of what they type in form 2. H...
