I am trying to debug an issue with an ionic modal that is refusing to dismiss. I cannot reproduce the issue in isolated environment, so I cannot really share any relevant code.
First I am trying to understand how there can be a mismatch between the prop value and the state value. In all my other occurrence's, these are the same.
Basically I have an (Ionic) modal that is managed like:
<Modal isOpen={showModal} />
After submitting a setShowModal(false)
will be called to dismiss the modal. The console logs for showModal are 'false'. Yet I still can see the modal.
When I check in React Dev Tools I see there is a mismatch between the 'props' isOpen and the 'state' isOpen. In my other working examples, they are synced the same.
What I am trying to understand here is the difference between the two (props and state in React Dev Tools)? And how they can possibly be different?