Hi there, my Swipeable still isn’t working even after I wrapped it with GestureHandlerRootFile.
It is still stating the “Swipeable: Unknown Word”.
Here is the code, thank you
import React from ‘react’
import { View, StyleSheet, Image, TouchableHighlight, TouchableOpacity } from ‘react-native’
import AppText from ‘./AppText’
import colors from ‘…/config/colors’
import { GestureHandlerRootView } from “react-native-gesture-handler”;
import Swipeable from ‘react-native-gesture-handler/Swipeable’;
function ListItem({ title, subTitle, image, onPress, renderRightActions }) {
return(
<GestureHandlerRootView>
<Swipeable renderRightActions={renderRightActions}>
<TouchableHighlight
underlayColor={colors.light}
onPress={onPress}>
<View style={styles.container}>
<Image style={styles.image} source={image}/>
<View>
<AppText style={styles.title}>{title}</AppText>
<AppText style={styles.subTitle}>{subTitle}</AppText>
</View>
</View>
</TouchableHighlight>
</Swipeable>
</GestureHandlerRootView>
)
}
const styles = StyleSheet.create({
image: {
width: 70,
height: 70,
borderRadius: 35,
marginRight: 10,
},
container: {
flexDirection: 'row',
padding: 15,
},
subTitle: {
color: colors.medium,
},
title: {
fontWeight: '500',
},
})
export default ListItem