[*]"react-native-gesture-handler": "^2.12.1"
[*]"react-native-reanimated": "~3.3.0"
[*]"react-native-safe-area-context": "4.6.3"
"expo": "^49.0.8" < /li>
< /ul>
Приложение: < /p>
Код: Выделить всё
import { BottomSheetModalProvider, BottomSheetModal } from '@gorhom/bottom-sheet';
import { Button } from '@rneui/themed';
import { useRef, useCallback, useMemo } from 'react';
import { View, Text, StyleSheet } from 'react-native';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
export default function App() {
const bottomSheetModalRef = useRef(null);
const snapPoints = useMemo(() => ['50%'], []);
const handlePresentModalPress = useCallback(() => {
bottomSheetModalRef.current?.present();
}, []);
const handleSheetChanges = useCallback((index) => {
console.log('handleSheetChanges', index);
}, []);
// renders
return (
Awesome 🎉
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
padding: 24,
justifyContent: 'center',
backgroundColor: 'grey',
},
contentContainer: {
flex: 1,
alignItems: 'center',
},
});
Подробнее здесь: https://stackoverflow.com/questions/770 ... d-with-apk
Мобильная версия