Component - Swipeable list items
This component shows a list where each item can be swiped left or right to reveal actions like delete or archive. It helps users quickly manage list items with simple gestures.
This component shows a list where each item can be swiped left or right to reveal actions like delete or archive. It helps users quickly manage list items with simple gestures.
View ├─ FlatList │ ├─ Swipeable (for each item) │ │ ├─ View (item content) │ │ └─ View (hidden actions) └─ StatusBar
Swipeable in React Native list items?Swipeable component enables swipe gestures on list items.Swipeable?renderLeftActions defines buttons shown when swiping to the right (revealing left side).renderLeftActions is correct.import { Swipeable } from 'react-native-gesture-handler';
function ListItem() {
return (
}
>
Message
);
}renderLeftActions shows buttons when swiping to the right (revealing left side).renderRightActions, which is not provided, so no button appears.import { Swipeable } from 'react-native-gesture-handler';
function Item() {
return (
Delete}
>
Item
);
}Text.Text alone won't respond to touches; use TouchableOpacity or Button.renderRightActions shows buttons on right side (swipe left), renderLeftActions shows buttons on left side (swipe right).Pass the test and this pattern moves unknown