[**@twipped/hooks**](../../README.md) • **Docs**

***

# Function: childIterator()

> **childIterator**(`children`, `all`?): `any`

Generator function which iterates over a react component's children, descending into fragments
By default this will exclude text nodes and non-component values

## Parameters

• **children**: `ReactNode` \| `ReactNode`[]

• **all?**: `boolean`

Pass true to yield all child elements, not just valid components

## Returns

`any`

## Yields

## Source

[hooks/children.js:97](https://github.com/Twipped/hooks/blob/main/hooks/children.js#L97)
