Reference
cloneElement
Clones an existing element with merged props and optional replacement children.
Signature
function cloneElement<P>(element: ReactCompatElement<P>, props: Partial<P> & ReactReservedProps | null, ...children: ReactCompatNode[]): ReactCompatElement<P>