Skip to content

Instantly share code, notes, and snippets.

@crazypixel
Last active September 8, 2019 15:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crazypixel/8dd96ebb1f23f3070d6e69f3e3e9d417 to your computer and use it in GitHub Desktop.
Save crazypixel/8dd96ebb1f23f3070d6e69f3e3e9d417 to your computer and use it in GitHub Desktop.
Drag and Drop with hooks - basic usage example
import React from 'react';
import Draggable from './Draggble';
const App = () => {
return (
<div>
<Draggable onDrag={console.log} id="uniqueId">
<h2>Drag me</h2>
</Draggable>
</div>
);
};
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment