@joint/react
    Preparing search index...

    Function useCreateElement

    • A custom hook that adds an element to the graph.

      Type Parameters

      • T extends GraphElement | Element<Attributes, ModelSetOptions>

      Returns (element: SetElement<T>) => void

      A function that adds the element to the graph.

      const addElement = useCreateElement();
      addElement({ id: '1', label: 'Node 1' });