react-beautiful-dnd migration
An optional Pragmatic drag and drop package that enables rapid migration from react-beautiful-dnd to Pragmatic drag and dropThis package depends on:
React 19
This package does not currently support React 19.
This package exposes the same exports and types of react-beautiful-dnd@13 and uses
@atlaskit/pragmatic-drag-and-drop to power those exports.
At a high level, all you need to do is swap your imports of react-beautiful-dnd in your code to
@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration and your drag and drop
experience(s) will now be powered by Pragmatic drag and drop.
This package also includes a codemod to help automatically shift over react-beautiful-dnd@12 and
react-beautiful-dnd@13 to @atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration.
Prerequisites
To use @atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration you should:
- Already be using
react-beautiful-dnd. If this is a new feature, adopt@atlaskit/pragmatic-drag-and-dropdirectly. - Be using major version 12 or 13 of
react-beautiful-dnd.
Migration steps
Install
@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migrationRun the codemod client with the command
npx @atlaskit/codemod-cli --parser {tsx|babylon} --extensions ts,tsx,js [relativePath].Select the codemod based on which version of
react-beautiful-dndyou are using:For major version 12, select
adoption-from-rbd-12For major version 13, select
adoption-from-rbd-13
Acknowledge and remove the comments left by the codemod.
Troubleshooting
If you run into any issues while migrating, please reach out to us for assistance.