-
-
Notifications
You must be signed in to change notification settings - Fork 899
Closed
software-mansion/react-native-reanimated
#3531Labels
Description
Bug
I'm using React Native with Fabric, and for fabric, I need to install react-native-reanimated ^3.0.0-rc.0
to get it to work,
Environment info
Library | Version |
---|---|
@gorhom/bottom-sheet | 4.4.2 |
react-native | 0.69.1 |
react-native-reanimated | 3.0.0-rc.0 |
react-native-gesture-handler | 2.5.0 |
Steps To Reproduce
It happened when the screen with BottomSheet
is rendered.
Reproducible sample code
import styles from './styles';
import React, { forwardRef, useCallback, useEffect, useRef } from 'react';
import { View } from 'react-native';
import BottomSheet from '@gorhom/bottom-sheet';
const SwipeableModal = forwardRef(function (
{ children, points = ['25%', '50%'] },
ref
) {
const refModal = useRef();
const onChange = useCallback((index) => {
console.log('SwipeableModal.onChange: ', index);
}, []);
useEffect(() => {
ref.current = {
open: () => refModal.current?.snapToIndex(1),
close: () => refModal.current?.close(),
};
}, []);
return (
<View style={styles.container}>
<BottomSheet
ref={refModal}
enablePanDownToClose={true}
snapPoints={points}
index={1}
onChange={onChange}
>
{children}
</BottomSheet>
</View>
);
});
export default SwipeableModal;
amiinous