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

***

# Function: cloneChildren()

> **cloneChildren**(`children`, `predicate`): (`string` \| `number` \| `ReactElement`\<`any`, `string` \| `JSXElementConstructor`\<`any`\>\> \| `Iterable`\<`ReactNode`\> \| `ReactPortal`)[]

Clones the children of a react component in a map fashion, applying new properties to each.

## Parameters

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

• **predicate**: `any`

## Returns

(`string` \| `number` \| `ReactElement`\<`any`, `string` \| `JSXElementConstructor`\<`any`\>\> \| `Iterable`\<`ReactNode`\> \| `ReactPortal`)[]

## Source

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