[iOS] Attempt to present <RCTFabricModalHostViewController: 0x11c98e200> on <RCTFabricModalHostViewController: 0x11a3c7a00> (from <RCTFabricModalHostViewController: 0x11a3c7a00>) whose view is not in the window hierarchy. #48195
Labels
Component: Modal
Needs: Attention
Issues where the author has responded to feedback.
Needs: Repro
This issue could be improved with a clear list of steps to reproduce the issue.
Newer Patch Available
Platform: iOS
iOS applications.
Type: New Architecture
Issues and PRs related to new architecture (Fabric/Turbo Modules)
Description
Hello, i am getting this error when opening one modal after the other.
Steps to reproduce
I am trying to render conditionally the modals like this:
<FIrstModal visible={stage === Stages.FirstStage} closeHandler={close} /> <SecondModal visible={stage === Stages.SecondStage} closeHandler={close} /> <ThirdModal visible={stage === Stages.ThirdStage} closeHandler={close} />
of course, each modal has a 'visible' property which is determined by the current stage (which is an enum) as shown in this example. After closing the first modal (closing basically represents changing the current stage so it gets increased by 1 and goes to the second modal and so on) I get the error which I pasted in the title. I would be glad if someone had already faced this kind of issue!
React Native Version
0.76.3
Affected Platforms
Build - MacOS
Areas
Fabric - The New Renderer
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/georgi2005atanasov
Screenshots and Videos
No response
The text was updated successfully, but these errors were encountered: