Answer the question
In order to leave comments, you need to log in
How to show the component on click and close from the component itself?
I have a list popup component, I open it with a button on the home cabinet pages, media through the state I show the component. In list, i.e. in the component itself, there is a cancel button that should close the popup. Briefly how to open from outside the list component and close inside the list component. Use user reducer?
Answer the question
In order to leave comments, you need to log in
if the display flag of this component is in the state of the parent component, then you need to pass a function to the component to set the value from this state
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question