[v2] null is not an object (evaluating 'sheetsQueueRef.current[sheetsQueueRef.current.length - 1].ref.current.minimize')
See original GitHub issueBug
Environment info
Library | Version |
---|---|
@gorhom/bottom-sheet | 2.2.2 |
react-native | 0.63.4 |
react-native-reanimated | 1.13.2 |
react-native-gesture-handler | 1.10.3 |
Steps To Reproduce
- Add BottomSheetModalProvider to the root App component.
- Use BottomSheetModal on some screen in the app.
- Go to that screen and present/dismiss BottomSheetModal a couple of times, then go back to previous screen and return back to screen with BottomSheetModal and it crashes.
Same as #292
Describe what you expected to happen:
- No crash
Reproducible sample code
<BottomSheetModal
ref={ref}
snapPoints={[500]}
backgroundComponent={() => <View />}
backdropComponent={BottomSheetBackdrop}
handleComponent={() => <View />}
index={0}
onChange={() => {}}
onDismiss={() => {}}
>
// ...
</BottomSheetModal>
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:7 (1 by maintainers)
Top Results From Across the Web
null is not an object (evaluating 'filed2.current.focus')] - Stack ...
I'm trying to focus on the next input field whenever the next button is pressed on the keyboard. From the react native documentation...
Read more >useRef "Object is possibly null" error in React [Solved]
TypeScript knows that the current property on the ref object does not store a null value once we enter the if block. Make...
Read more >Troubleshooting | React Navigation
These issues may or may not be related to React Navigation itself. ... I'm getting an error "null is not an object (evaluating...
Read more >React Native. undefined is not an object (evaluating '_this ...
My code is pretty simple and the trace obviously points to SectionList being the problem. Copy Code return ( <View style={{ flex:1, backgroundColor: ......
Read more >Refs and the DOM - React
When the ref attribute is used on a custom class component, the ref object receives the mounted instance of the component as its...
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 FreeTop 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
Top GitHub Comments
Just tried this library today and immediately ran into this issue as well. My setup is almost identical to yours. A simple reproduction is to simply have two modals mounted at the same time.
I’m guessing that there’s an issue with the
StackBehavior
logic which the docs say isn’t implemented for v2 (though what the v2 behavior should be is unclear).Hi @Yonom, Did you fix this issue for iOS?