I only see examples of using useContext to pass values between parent and child components. I want to know if useContext can pass values between sibling components, which come from different files.
I only see examples of using useContext to pass values between parent and child components. I want to know if useContext can pass values between sibling components, which come from different files.
You can define context on parent component and then use it in its 2 childs respectively siblings.
You can also use Redux for this