react-native-raw-bottom-sheet
react-native-raw-bottom-sheet copied to clipboard
[iOS] Not working when open is called inside useEffect
When called inside a useEffect and in iOS, open function does not works properly. In Android works just fine.
const refRBSheet = useRef();
useEffect(() => {
if (signInError) {
refRBSheet.current.open();
}
});
I solved it by putting a setTimeout and leaving the useEffect dependencies empty
useEffect(() => {
if (signInError) {
setTimeout(() => {
refRBSheet.current.open();
}, 200)
}
}, []);
Any fix?