-
-
Notifications
You must be signed in to change notification settings - Fork 545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modal blinking on different screens with previous content #2544
Comments
resolved by adding:
|
same issue for me. but why before this version 4.0.0 we dont need to set this condition without else { return null } Note: with else { return null } did not work, still the same blinking react native 0.76.5, react-native-screens 4.5.0 |
I'm still experiencing this too this issue should be reopened IMO |
I got the same issue using react-native 0.76.6 (on Ios) and I finally figured out a way out of it. Apparently, React Native modal keeps itself "alive" in some way (well it's a modal/portal kind of) and if seems to "retain" its previous content which displays "in between" the visibility transition. In case it can help anyone, I just put together a simple OverlayContainer (which uses Modal), that clear it's content prior to "close" itself, so next time it reopen, there is just NO previous content. (note my version also displays a Pressable container which is behind the content to be displayed for me to be able to close the modal whenever user press outside of the "Content" view. OverlayContainer.tsx
|
Description
I created a simple dropdown menu using a native modal, but for some reason after closing it, the content of the previous modal appears in a blinking on the next screen where the dropdown menu using another content
Screen.Recording.2024-11-29.at.14.05.35.mov
Steps to reproduce
yarn
yarn pod-install
yarn start
yarn ios
Snack or a link to a repository
https://github.com/denysoleksiienko/react-native-modal-blinking
Screens version
^4.3.0
React Native version
0.76.3
Platforms
Android, iOS
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
iOS simulator
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: