-
-
Notifications
You must be signed in to change notification settings - Fork 643
Expand file tree
/
Copy pathTest2819.tsx
More file actions
40 lines (35 loc) · 945 Bytes
/
Test2819.tsx
File metadata and controls
40 lines (35 loc) · 945 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import React from 'react';
import { Text, View } from 'react-native';
import PressableWithFeedback from '../shared/PressableWithFeedback';
import { Gesture, GestureDetector, GestureHandlerRootView } from 'react-native-gesture-handler';
function SharedPressable() {
return (
<PressableWithFeedback>
<View style={{ height: 120 }}>
<Text>Regular pressable</Text>
</View>
</PressableWithFeedback>
);
}
function HomeOne() {
return (
<View style={{ height: 600, backgroundColor: 'seagreen' }}>
<SharedPressable />
</View>
);
}
export function App() {
const gesture = Gesture.Pan()
.onBegin(() => {
'worklet';
})
.enabled(true); // Change this to `false` to fix the issue.
return (
<GestureHandlerRootView style={{ flex: 1 }}>
<GestureDetector gesture={gesture}>
<HomeOne />
</GestureDetector>
</GestureHandlerRootView>
);
}
export default App;