Skip to Content
React Flow 13 is here! Read the announcement →

OnInit

Source on GitHub 

The OnInit type defines the callback function that is called when the ReactFlow instance is initialized. This callback receives the ReactFlow instance as its argument.

type OnInit = (reactFlowInstance: ReactFlowInstance) => void;
Parameters:
NameTypeDefault
reactFlowInstanceReactFlowInstance<NodeType, EdgeType>
Returns:
void