iOS Modal:multiple modal not working
Description
When I need to pop up multiple modals at the same time in react native, it doesn't work properly on iOS. It is presented on the native code of react native, iOS native cannot present multiple controllers at the same time
Version
0.61.5
Output of npx react-native info
System: OS: macOS 12.6.3 CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz Memory: 302.82 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 14.17.3 - /usr/local/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 6.14.11 - /usr/local/bin/npm Watchman: 20200816.222424.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1 IDEs: Xcode: 14.2/14C18 - /usr/bin/xcodebuild npmPackages: @react-native-community/cli: ^3.0.0 => 3.2.1 react: 16.9.0 => 16.9.0 react-native: ^0.61.5 => 0.61.5 npmGlobalPackages: react-native-cli: 2.0.1
Steps to reproduce
Create multiple <Modal> in rn, let them display at the same time, it does not work properly in iOS
Snack, code example, screenshot, or link to a repository
Create multiple <Modal> in rn, let them display at the same time, it does not work properly in iOS
@coderomw it'll work if you nest modals into one another. Like below. Is this something possible for you?
<Modal1>
<Modal2>
</Modal2>
</Modal1>
@coderomw refer to this pr https://github.com/facebook/react-native/pull/36262/commits
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
@coderomw can you test changes from this PR? https://github.com/facebook/react-native/pull/31498
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
Here is a solution using context if it helps: https://github.com/travis575757/react-native-stackable-modals-tutorial
Hi, here is my solution: maintaining a stack to render multiple modals in a nested manner. https://gist.github.com/icedcrow/c0a43e0a2d898333416f2dba47a86bee