Upgrading to @use-gesture/react

How to switch from react-use-gesture to ๐Ÿ‘Š @use-gesture/react


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.