-
Notifications
You must be signed in to change notification settings - Fork 45.6k
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
Update "Cloning ReactElement" documentation to include info on React.cloneElement #3432
Comments
Good idea, thanks. Want to send a pull request? |
Sure.
|
mheiber
added a commit
to mheiber/react
that referenced
this issue
Mar 18, 2015
Updated documentation to reflect that using React.cloneElement is the new way to copy an element and preserve `key` and `ref`. fixes facebook#3432
mheiber
added a commit
to mheiber/react
that referenced
this issue
Mar 21, 2015
Update documentation to reflect that React.cloneElement is preferred. fixes facebook#3432 Also change wording so that it is clear that `cloneWithProps` doesn't mutate props.
framp
pushed a commit
to framp/react
that referenced
this issue
May 26, 2015
Updated documentation to reflect that using React.cloneElement is the new way to copy an element and preserve `key` and `ref`. Fixes facebook#3432, closes facebook#3447.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The documentation for "Cloning ReactElement" uses React.cloneWithProps and recommends the following method for preserving
key
:I suggest including React.cloneElement here instead of recommending to add
key
to theextraProps
object.The text was updated successfully, but these errors were encountered: