usePaint ​
Hook that allows you to draw in a specific area
typescript
import { usePaint } from '@siberiacancode/reactuse';
Usage ​
typescript
const drawing = usePaint(canvasRef);
Demo ​
Api ​
Parameters
Name | Type | Default | Note |
---|---|---|---|
target | Target | - | The target element to be painted |
options? | UsePaintOptions | - | The options to be used |
Returns
Parameters
Name | Type | Default | Note |
---|---|---|---|
options? | UsePaintOptions | - | The options to be used |