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.