Reactjs – How to let component know which context calls the component?
Suppose I have a component and two contexts. The both contexts can use this component. When context1 uses it, the component should do const context=useContext(Context1) in itself. When context2 uses it, the component should do const context=useContext(Context2) in itself. But…