#app-index.js:32 Warning: findDOMNode is deprecated in StrictMode

5 messages · Page 1 of 1 (latest)

sturdy dirge
#

app-index.js:32 Warning: 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.

"use client"
import Draggable from 'react-draggable'; 

export default function Home() {

  function handleStop()
  {
    console.log("handleStop");
  }

  return (
    <main>
      <Draggable
        onStop={handleStop}
> 
        <div>We can move this text</div> 
      </Draggable> 
    </main>
  );
}

I'm pretty new and trying to use Draggable library.

https://www.npmjs.com/package/react-draggable/v/4.4.6

sturdy dirge
#

Any ideas?

violet rain
sturdy dirge
violet rain