This commit is contained in:
14
node_modules/react-dnd/dist/esm/hooks/useDragDropManager.js
generated
vendored
Normal file
14
node_modules/react-dnd/dist/esm/hooks/useDragDropManager.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useContext } from 'react';
|
||||
import { invariant } from '@react-dnd/invariant';
|
||||
import { DndContext } from '../core';
|
||||
/**
|
||||
* A hook to retrieve the DragDropManager from Context
|
||||
*/
|
||||
|
||||
export function useDragDropManager() {
|
||||
var _useContext = useContext(DndContext),
|
||||
dragDropManager = _useContext.dragDropManager;
|
||||
|
||||
invariant(dragDropManager != null, 'Expected drag drop context');
|
||||
return dragDropManager;
|
||||
}
|
||||
Reference in New Issue
Block a user