Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloneElement could potentially be confusing #2

Open
craigbilner opened this issue Mar 21, 2017 · 0 comments
Open

cloneElement could potentially be confusing #2

craigbilner opened this issue Mar 21, 2017 · 0 comments

Comments

@craigbilner
Copy link

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>
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant