mobx-bonsai
    Preparing search index...

    Function getParentToChildPath

    • Gets the path to get from a parent to a given child. Returns an empty array if the child is actually the given parent or undefined if the child is not a child of the parent.

      Parameters

      • fromParent: object

        The parent node.

      • toChild: object

        The child node.

      Returns Path | undefined

      The path from the parent to the child or undefined if the child is not a child of the parent.