Upgrading to @use-gesture/react
How to switch from react-use-gesture
to ๐ @use-gesture/react
Transition
react-use-gesture
was born as a React-only project. ๐ @use-gesture/react replaces react-use-gesture
completely and relies on a universal core, ๐ @use-gesture/core that also powers ๐ @use-gesture/vanilla.
Upgrading from react-use-gesture
to ๐ @use-gesture/react is rather straightforward, although includes some breaking changes that are listed here.
Main breaking change
The API is 95% the same as before, the main one being the domTarget
option being renamed to target
.