Skip to content

cloneElement could potentially be confusing #2

@craigbilner

Description

@craigbilner

The cloneElement example works because there's only one child, but the variable is called children, which could possibly cause confusion when someone adds more than one child and it doesn't work.

Should there be an example with:

...
<main>{React.Children.map(children, el => React.cloneElement(el, { theme }))}</main>
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions