Closed
Description
I have a problem with states inside react-modal. I have couple of components inside react-modal. After I close this modal and reopen again, states of internal components still the same (for instance, input values do not reset after modal toggling). Is there such a possibility to reset all state inside react-modal after close? I know it should be done inside componentWillUnmount
but as far as I understood react-modal hides instead of unmounting.
My current solution is - do not render modal until open.
state = {
isModalOpen: false
}
// somewhere in component
{ isModalOpen && <Modal isOpen={ isModalOpen } /> }