question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

setModalVisible not working/

See original GitHub issue

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 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:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ragranadosucommented, Mar 8, 2021

the problem its only on iOS or android too? im haveing that problem on iOS only 😕

0reactions
mmazzarolocommented, Aug 29, 2021

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found