Skip to content

cloneElement could potentially be confusing #2

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>
...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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