1 | import { invariant } from '@react-dnd/invariant';
|
2 | import { useContext } from 'react';
|
3 | import { DndContext } from '../core/index.js';
|
4 | /**
|
5 | * A hook to retrieve the DragDropManager from Context
|
6 | */ export function useDragDropManager() {
|
7 | const { dragDropManager } = useContext(DndContext);
|
8 | invariant(dragDropManager != null, 'Expected drag drop context');
|
9 | return dragDropManager;
|
10 | }
|
11 |
|
12 | //# sourceMappingURL=useDragDropManager.js.map |
\ | No newline at end of file |