gorhom / react-native-bottom-sheet

A performant interactive bottom sheet with fully configurable options 🚀
https://gorhom.dev/react-native-bottom-sheet/
MIT License
7.04k stars 768 forks source link

How to use BottomSheet as a reusable component holding different content #973

Closed dani-z closed 2 years ago

dani-z commented 2 years ago

Discussed in https://github.com/gorhom/react-native-bottom-sheet/discussions/967

Originally posted by **dani-z** May 31, 2022 Hi there 👋 First I want to thank you for writing this awesome lib. I remember how hard it was when I wrote a basic version of this initially. While using it in a fairly large app I found a need to reuse the main `BottomSheet` component and pass in a `{children}`. This way I can reuse the ref and outer component from many screens. All works OK until Android opens all of the sheets on top of each other. It doesn't happen on iOS. Now I am not sure if what I do is correct hence I am writing this here. Is there a better way to achieve this or is there any example that could help with this use case? Many thanks,
github-actions[bot] commented 2 years ago

@dani-z: hello! :wave:

This issue is being automatically closed because it does not follow the issue template.