shirakaba / react-nativescript

React renderer for NativeScript
https://react-nativescript.netlify.com
MIT License
284 stars 14 forks source link

Showing modal in iOS displays modal once #96

Open armespavong opened 1 year ago

armespavong commented 1 year ago

I've been trying to show modal in iOS based on the document https://react-nativescript.netlify.app/docs/core-concepts/modals. Everything works fine in android but in iOS, the modal displays only once. After I closed the modal call the function handleOpenModal to show it again, the modal doesn't display.

Here are my dependencies "@nativescript/core": "^8.6.0" "react-nativescript": "^5.0.0" "@nativescript/android": "^8.6.2" "@nativescript/ios": "8.6.1"

Please see this in my video My Video

shirakaba commented 1 year ago

I’m afraid I’m not actively maintaining RNS anymore so won’t be able to dig into what the cause for the issue might be, but I would recommend as an alternative trying the React Navigation (version 5) approach to opening a modal rather than the portal-based approach (it’s documented because it used to be the only way to open portals before I implemented a proper navigation library, but ideally the docs should recommend React Navigation instead):

https://reactnavigation.org/docs/5.x/modal/