mobx-bonsai
    Preparing search index...

    Function onInit

    • Registers a callback function to be invoked after a node of the specified type is initialized.

      Type Parameters

      • TNode extends NodeWithAnyType

        The type of the node that extends NodeWithAnyType

      Parameters

      • nodeType: TypedNodeType<TNode>

        The typed node type to attach the initialization callback to

      • callback: (node: TNode) => void

        Function to be called with the newly initialized node

      Returns Dispose

      A disposer function that can be called to unregister the callback