Prop-driven behavior #1171
Replies: 2 comments
-
|
ping @gorhom, implementing this manually is a huge pain :( |
Beta Was this translation helpful? Give feedback.
-
|
I guess it's all coming from that Today it leads to having N bottom sheet components rendered (if you have N different bottom sheets) on the same surface/screen even if you need only 1 per time. Speaking about native iOS realm — the concept of the And native iOS sheets implements the modal like UI on the bigger windows/screens view ports out-of-box, which if we move towards the There was a separated conversion about that specifically, but this sounds to be somehow related as well. Would love to see your thoughts on it @gorhom |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, is there any plans or way to control the BottomSheet component from a parent via props? Trying to use imperative functions ala class components in React Native functional components to open, close, snap to location, etc feels like an anti-pattern and breaks the convention of most of our internal component libraries. Beyond that our bottom sheet is hard to control and many times ends up in intermediate states that make it unusable until the app is refreshed.
Having the BottomSheet controls abstracted and the component takes care of the state given the props is a much better way to use the component. Just wanted to know if I was missing something or at least guidance on how to use the component properly without relying on
useEffecthooks to monitor and sync the component open/close/snapping states. Thanks!Beta Was this translation helpful? Give feedback.
All reactions