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

findDOMNode is deprecated in StrictMode

Open njho opened this issue 1 year ago • 3 comments

Receiving a warning of the following:

findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of DraggableCore which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here

It seems to work anyhow however:

    "next": "13.0.2",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-draggable": "^4.4.5",

njho avatar Nov 16 '22 18:11 njho

I tried using ref, it is a bit buggy but it works.

<Draggable nodeRef={nodeRef}>

gtwebsite avatar Nov 18 '22 18:11 gtwebsite

Having the same problem

vd1371 avatar Nov 21 '22 22:11 vd1371

It's answered in changelog https://github.com/react-grid-layout/react-draggable/blob/master/CHANGELOG.md#440-may-12-2020

PuruVJ avatar Dec 06 '22 18:12 PuruVJ