react-dnd icon indicating copy to clipboard operation
react-dnd copied to clipboard

While hovering over the drop zone, the component will re-render constantly.

Open NicolaeVSS opened this issue 2 years ago • 0 comments

https://github.com/chidimo/react-dnd/blob/fbe62778c4b2cdf5cc6a432cd18943ac66405998/src/DragAndDrop.js#L28

Can be fixed by doing:

if(!props.data.inDropZone){
        dispatch({ type: 'SET_IN_DROP_ZONE', inDropZone: true });
}

NicolaeVSS avatar Mar 10 '22 01:03 NicolaeVSS