React
@use-gesture/react
React target for @use-gesture
Hooks
react
hook
gesture
mouse
trackpad
touch
drag
pinch
rotate
scale
Stars
9.6k
Weekly
4.5M
Open issues
57
Bundle
~25 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
- 4.5M weekly downloads. Battle tested
- First-class TypeScript definitions
- MIT licensed
Considerations
- Adds roughly ~25 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 57 open issues on GitHub