Releases: Guccio163/react-native-reshuffled
Releases · Guccio163/react-native-reshuffled
Reshuffled - 0.2.3
Key changes
New props
-
allowCollisions— whentrue, dragged items can overlap others and the grid does not auto-adjust positions after a drop. -
getNewGrid— optional callback that replaces the default best-fit reshuffling algorithm so user can implement custom rules (e.g. swap on a single overlap, shuffle all cards randomly etc.). -
onDragEnd— optional callback invoked after every successful drop with the updated item array.
Grid usage
-
Breaking —
Reshuffled.Gridnamespace API — the grid is no longer exported asReshufflableGrid. Import the namespace and use the.Gridproperty:// before import { ReshufflableGrid } from 'react-native-reshuffled' <ReshufflableGrid ... />
// after import { Reshuffled } from 'react-native-reshuffled' <Reshuffled.Grid ... />
Fixes
- Z-order after drop — fixed the dragged tile zIndex flicker after drop.
Refactors
- ReshufflableGrid — mobile and web implementation reorganized into ReshufflableGridCore abstraction and the useReshufflableGrid hook to separate layout/state logic from presentation.
Other
- Example: puzzles — demo update with a screen comparing collision mode vs custom
getNewGridbehavior.