Files
sgauthier 6e64e138e2
All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s
planning
2024-10-14 09:15:30 +02:00

11 lines
336 B
JavaScript

import { useEffect, useMemo } from 'react';
import { DropTargetImpl } from './DropTargetImpl';
export function useDropTarget(spec, monitor) {
var dropTarget = useMemo(function () {
return new DropTargetImpl(spec, monitor);
}, [monitor]);
useEffect(function () {
dropTarget.spec = spec;
}, [spec]);
return dropTarget;
}