diff --git a/README.md b/README.md index 43958383..c3022e28 100755 --- a/README.md +++ b/README.md @@ -498,26 +498,6 @@ class YourComponent extends Component { If set to `true`, will allow dragging on non left-button clicks. -#### `nodeRef?: React.Ref` - -please see, https://github.com/STRML/react-draggable -``` -If running in React Strict mode, ReactDOM.findDOMNode() is deprecated. -Unfortunately, in order for to work properly, we need raw access -to the underlying DOM node. If you want to avoid the warning, pass a `nodeRef` -as in this example: - -function MyComponent() { - const nodeRef = React.useRef(null); - return ( - -
Example Target
-
- ); -} - -``` - ## Test ``` sh diff --git a/src/index.tsx b/src/index.tsx index 9f16aea3..52f4661f 100755 --- a/src/index.tsx +++ b/src/index.tsx @@ -626,7 +626,7 @@ export class Rnd extends React.PureComponent { cancel={cancel} scale={scale} allowAnyClick={allowAnyClick} - nodeRef={nodeRef} + nodeRef={{ current: this.getSelfElement() }} >