UNPKG

@joint/react

Version:

React bindings and hooks for JointJS to build interactive diagrams and graphs.

14 lines (13 loc) 419 B
import type { dia } from '@joint/core'; /** * Return jointjs paper instance from the paper context. * @see https://docs.jointjs.com/learn/quickstart/paper * @group Hooks * ```tsx * import { usePaper } from '@joint/react'; * const paper = usePaper(); * ``` * @returns - The jointjs paper instance. * @throws - If the hook is not used inside the paper context. */ export declare function usePaper(): dia.Paper;