React API

cloneElement alternatives

Cloning shallowly merges props and may obscure data flow; prefer explicit inputs.

Formal Syntax & Structure

react syntaxreact
cloneElement(element, {highlighted: true})

Working Example

Example Snippetreact
Use a renderItem prop in new lists.
React Reference