Documents / @faasjs/ant-design / cloneUnionFaasItemElement
Function: cloneUnionFaasItemElement()
cloneUnionFaasItemElement(
element
,props
):ReactElement
<UnionFaasItemInjection
<any
,any
>>
Clone a UnionFaasItemElement with the given props.
This function takes a UnionFaasItemElement and props, and returns a cloned element. If the provided element is a valid React element, it clones it with the new props. Otherwise, it creates a new element from the provided element and props.
Parameters
element
UnionFaasItemElement
<any
, any
>
The UnionFaasItemElement to be cloned.
props
any
The props to be applied to the cloned element.
Returns
ReactElement
<UnionFaasItemInjection
<any
, any
>>
The cloned element with the applied props.