useDndContext
For advanced use-cases, for example, if you're building your own presets on top of @dnd-kit/core, you may want to have access to the internal context of <DndContext> that the useDraggable and useDroppable have access to.
1
import {useDndContext} from '@dnd-kit/core';
2
3
function CustomPreset() {
4
const dndContext = useDndContext();
5
}
Copied!
If you think the preset you're building could be useful to others, feel free to open up a PR for discussion in the dnd-kit repository.
Copy link
Edit on GitHub