React
@use-gesture/react
React target for @use-gesture
Hooks
react
hook
gesture
mouse
trackpad
touch
drag
pinch
rotate
scale
Stars
693
Weekly
5.8M
Open issues
9
Bundle
~15 kB
Installation
npm install @use-gesture/reactCode example
import { useReact } from "@use-gesture/react";
export function Example() {
const value = useReact();
return <p>{String(value)}</p>;
}Pros & cons
Pros
- Actively maintained by Paul Henschel
- 5.8M weekly downloads. Battle tested
- First-class TypeScript definitions
- MIT licensed
Considerations
- Adds roughly ~15 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 9 open issues on GitHub