useCoarsePointer

Returns whether any of the reader's pointers is coarse, and re-renders when that changes.

@internote/canvas-sdk/reactHook
On this page
import { useCoarsePointer } from '@internote/canvas-sdk/react';

False on the server and while hydrating, so the first client render matches the server's and a coarse reader's targets grow straight after.

#Signature

(): boolean

#Example

const coarse = useCoarsePointer();
<circle r={coarse ? Math.max(r, 22) : r} />

Declared in packages/canvas-sdk/src/react/gestures/use-coarse-pointer.ts:41.

Last updated