Bottom sheet only opens sometimes
See original GitHub issueBug
Using with Expo 40, and just repro’d with the latest "@gorhom/bottom-sheet": "^2.0.2" on a real Android device using the Expo app.
I can’t nail down what’s causing this, but the bottom sheet will only open sometimes (see console output screenshot below). On load it’s open correctly, but if I swipe down to close it, then it only opens seemingly randomly when the onPress={openPostActions} is pressed.

Method
const postActions = useRef<BottomSheet>(null);
const openPostActions = () => {
console.log('openPostActions()');
postActions.current.snapTo(1);
};
Bottom sheet
<BottomSheet
ref={postActions}
index={1}
snapPoints={[0, '25%']}
onChange={handleSheetChanges}
>
<View style={styles.contentContainer}>
<Text onPress={reportPost} style={styles.postActionsText}>Report Post</Text>
<View style={{ backgroundColor: 'black', borderTop: 1, opacity: .15, height: 1,}} />
<Text onPress={deletePost} style={[styles.postActionsText, styles.postActionsTextDanger]}>Delete Post</Text>
</View>
</BottomSheet>
Environment info
| Library | Version |
|---|---|
| @gorhom/bottom-sheet | 2.0.2 |
| react-native | https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz |
| react-native-reanimated | 2.0.0-rc.1 |
| react-native-gesture-handler | 1.9.0 |
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Set state of BottomSheetDialogFragment to expanded
Bottom sheets are set to STATE_COLLAPSED at first. Call BottomSheetBehavior#setState(STATE_EXPANDED) if you want to expand it. Note that you ...
Read more >Fitted Bottom Sheet Only | Wayfair
Open Box Price:$33.30-$35.81. (680). Rated 4.5 out of 5 stars.680 total votes. Free shipping. This sheet set makes your bed a cool, soft...
Read more >The 6 Best Fitted Sheets of 2022 | Tested by GearLab
We tested dozens of fitted sheets from brands like Cosmoplus, Amazon Basics, Mayfair, and more to find the softest, coziest, most durable options...
Read more >Jetpack Compose — Android Bottom Sheet | by Christian Halim
In Jetpack Compose, there are two types of bottom sheets, BottomSheet ... With these classes, it will simplify our bottom sheet because we...
Read more >We Slept on Lots of Linen Sheets, and These Are Our 19 ...
“The sheets feel nice, soft, and cozy and have washed just fine,” she adds. The queen set comes with a fitted sheet and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I may’ve found something, I downgraded to your v2 and Reanimated 1 and I can repro this. Without
useMemoit won’t open, even though in your documentation you have an example of not using it, which is what I was doinghttps://gorhom.github.io/react-native-bottom-sheet/props
ie.
Does not work
Does work
good finding , i think it is important to provide a memoized variables to prevent unwanted side effects, i will need to update the docs to mention it 👍