Skip to content

Commit

Permalink
Update introduction.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
dbismut authored Jun 18, 2023
1 parent ae20b02 commit 54cc413
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion documentation/pages/docs/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function PullRelease() {

### How does this work?

The `useDrag` hook returns a function (stored in the `bind` constant), which when called returns an object with event handlers. Here, when you spread `{...bind()}` into a component, you're actually adding `onPointerDown`, `onPointerMove` and `onPointerUp` event handlers (the handlers may vary depending on the configuration options passed to the `useDrag`).
The `useDrag` hook returns a function (stored in the `bind` constant), which when called returns an object with event handlers. Here, when you spread `{...bind()}` into a component, you're actually adding `onPointerDown`, `onPointerMove` and `onPointerUp` event handlers (the handlers may vary depending on the configuration options passed to `useDrag`).

> It's important that you understand <UseGesture pkg="react" /> is not responsible for actually moving the component. The `useDrag` hook just hands over gesture data to react-spring which sets the component transforms. If you're not familiar with react-spring, head over [its documentation here](https://react-spring.io).
Expand Down

0 comments on commit 54cc413

Please sign in to comment.