Functions
mutateTree

mutateTree Function

mutateTree function is designed to apply mutations to a specific item within the tree data structure without altering the overall structure of the tree.

OptionTypeDescription
treeTreeDataThe current tree data structure.
ItemIdItemIdThe unique identifier of the item to mutate.
mutationTreeItemMutationAn object representing the changes to be applied to the item.
returnsTreeDataThe updated tree data structure after applying the mutation to the specified item.

Example Usage

const updatedTree = mutateTree(treeData, 'item-1', { isExpanded: true });