React Native = A framework for building native apps using React
This post aims to show the solution to a problem that we recently went through using the React Native Modal component.
If you have already used it, you have probably experienced the following problem: when opening a modal, unless you have a button inside it to hide or dismiss, it will remain open as in the following example.
Researching, I managed to reach a very objective conclusion. Even if someone has solved it in another way, I am available.
With the TouchableWithoutFeedback inclusion and its behavior, I can change the state of its visibility and it will be closed after I click anywhere outside the modal.
Source code
The source code for this project is available and can be found in this GitHub repository.
Top comments (0)