-
-
Notifications
You must be signed in to change notification settings - Fork 439
Open
Description
Description
When using react-native-draggable-flatlist
with Zustand state management, the list items disappear from the screen during drag operations. The same implementation works correctly with React's native useState
.
Reproduction Steps
- Create a component using
react-native-draggable-flatlist
with Zustand - Implement drag logic as shown in official examples
- Attempt to drag items
- Observe items disappearing (Zustand) vs working normally (useState)
Live Reproduction:
Expo Snack Demo
Code Comparison
Working (useState):
const [items, setItems] = useState(DATA);
useState.mp4
Broken (Zustand):
const { items, setItems } = useMyStore(); // Zustand store
useStore.mp4
Expected vs Actual Behavior
✅ Expected:
Items should remain visible and draggable (as with useState
implementation).
❌ Actual:
- Items disappear during drag operations
- No error messages in console
- UI becomes unresponsive after disappearance
Environment
Dependency | Version |
---|---|
react-native-draggable-flatlist | 4.0.2 |
zustand | 5.0.3 |
react | 19.0.0 |
react-native | 0.79.1 |
react-native-gesture-handler | 2.25.0 |
react-native-reanimated | 3.17.5 |
Metadata
Metadata
Assignees
Labels
No labels