mobx-bonsai
    Preparing search index...

    Function findChildren

    • Iterates through all children and collects them in a set if the given predicate matches.

      Type Parameters

      • T extends object

      Parameters

      • root: object

        Root node to get the matching children from.

      • predicate: (node: object) => boolean

        Function that will be run for every child of the root node.

      • Optionaloptions: { deep?: boolean }

        An optional object with the deep option (defaults to false) set to true to get the children deeply or false to get them shallowly.

      Returns ReadonlySet<T>

      A readonly set with the matching children.