setModalVisible not working/
See original GitHub issueI Have been trying to make a toggleable Modal. I practically copy pasted this code from the Read_Me, but it doesn’t seem to work. I have the modal visible by default and have it on an onBackDropPress it calls this function. const [isModalVisible, setModalVisible] = useState(false);
const toggleModal = () => { setModalVisible(!isModalVisible); console.log('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') };
. It prints the ‘aaaaaaaaaaaaaaaaa’ but doesn’t actually hide the Modal. I also tried just doing false instead of !isModalVisible. Any help would be greatly appreciated!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Modal closing in Expo, cannot find variable SetModelVisible
I am trying to implement shadow effect on button using react native but did not work can any one help me? 0 ·...
Read more >Developers - setModalVisible not working/ - - Bountysource
I Have been trying to make a toggleable Modal. I practically copy pasted this code from the Read_Me, but it doesn't seem to...
Read more >Modal - React Native
The Modal component is a basic way to present content above an enclosing view.
Read more >react-native-modal - npm
Start using react-native-modal in your project by running `npm i react-native-modal`. ... The component is not working as expected.
Read more >How to Close a React Native Modal with a Button - CodeProject
js to start working on your app!</Text> <Modal visible={modalVisible} onRequestClose={() => setModalVisible(false)}> ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
the problem its only on iOS or android too? im haveing that problem on iOS only 😕
Hi! I’m closing this issue because it’s a question and not a bug report. Please don’t take it personally, I’m just trying to make it easier to maintain this project by separating questions from bug reports 🙏.
If you’re still looking for feedback/answers, could you please ask your question in a new discussion?
Thank you!