@joint/react
    Preparing search index...

    Function useCellId

    useCellId()

    • Read the current cell id from the nearest CellIdContext. Populated by <Paper /> around every renderElement / renderLink invocation.

      Use this inside a render callback (or any component mounted from one) when you only need the id, it's cheaper than useCell() since it never subscribes to store updates. Throws when used outside a Paper render context.

      Returns ID

      the current cell id

      import { useCellId } from '@joint/react';

      function MyElement() {
      const id = useCellId();
      return <text>{id}</text>;
      }