[Bug]: stackBehavior="switch" unmounts the minimized modal and closes child modals immediately in v5.2.14 reanimated v4

Author: mo-elnadyCreated May 26, 2026Updated Sep 1, 2026
Labelsbug

Version

v5

Reanimated Version

v4

Gesture Handler Version

v2

Platforms

Android

What happened?

When using stackBehavior="switch" (the default stack behavior) on stacked bottom sheets, presenting a nested child bottom sheet (rendered inside the React tree of the parent sheet) causes the parent sheet to completely unmount/dismiss instead of minimizing.

Because the parent sheet is unmounted, its React subtree is destroyed, causing the newly opened child sheet to unmount and close immediately.

Reproduction steps

  1. Render a parent BottomSheetModal (Modal A).
  2. Inside the children of Modal A, render a child BottomSheetModal (Modal B).
  3. Present Modal A.
  4. Trigger Modal B to present.
  5. Modal B will briefly mount/appear and then immediately disappear because Modal A gets unmounted/dismissed entirely.

Reproduction sample

https://snack.expo.dev/@gorhom/bottom-sheet---issue-reproduction-template

Relevant log output

bash

Source: gorhom/react-native-bottom-sheet