A custom hook that adds an element to the graph.
A function that adds the element to the graph.
const addElement = useCreateElement();addElement({ id: '1', label: 'Node 1' }); Copy
const addElement = useCreateElement();addElement({ id: '1', label: 'Node 1' });
A custom hook that adds an element to the graph.