Function node

Converts a plain/observable object or array into a mobx-bonsai node. If the data is already a node it is returned as is. If the data contains a type and key and they match an already existing node then that node is reconciled with the new data and the existing node is returned.

  • Type Parameters

    • T extends object

    Parameters

    • struct: T

      The object or array to be converted.

    • Optionaloptions: { skipInit?: boolean }

      Optional configuration object.

    Returns T

    The node, an enhanced observable structure.