Lilact
    Preparing search index...

    Variable ChildrenConst

    Children: { only(children: any): any; toArray(children: any): any[] } = ...

    Children namespace for utilities that operate on props.children. Children is deprecated and not recommended by React documentation itself. But only and toArray are used extensively everywhere, so I included them.

    Type Declaration

    • only: function
      • Returns the only child from a children collection.

        Parameters

        • children: any

          The children to read.

        Returns any

        The single child (or null/exception based on the number of children).

    • toArray: function
      • Converts component children into a flat array.

        Parameters

        • children: any

          The children to convert.

        Returns any[]

        An array representation of the children.