-
Notifications
You must be signed in to change notification settings - Fork 48.6k
Updated docs examples/recommendations to use findDOMNode instead of getDOMNode #2802
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
Conversation
Code change was already merged here: #2646 This new pull request is for the docs update. |
Maybe add it to the Top-Level API doc as well? |
Yea, let's add the toplevel doc. |
@@ -201,7 +201,7 @@ Use this as an opportunity to operate on the DOM when the component has been upd | |||
|
|||
> Note: | |||
> | |||
> Prior to v0.9, the DOM node was passed in as the last argument. If you were using this, you can still access the DOM node by calling `this.getDOMNode()`. | |||
> Prior to v0.9, the DOM node was passed in as the last argument. If you were using this, you can still access the DOM node by calling `React.findDOMNode(this)`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's kill this note completely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(ping)
Alright, lets address the notes and add this to the top level API docs, then we can merge this. |
324ccb4
to
61d2cf5
Compare
@zpao good to go? |
DOMElement findDOMNode(ReactComponent component) | ||
``` | ||
|
||
Finds the native DOM element, if any, associated with the given ReactComponent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you just copy the text from here? http://facebook.github.io/react/docs/component-api.html#getdomnode
Maybe worth adding a note there too saying that React.findDOMNode is preferred.
036c843
to
d157895
Compare
d157895
to
030fc75
Compare
@spicyj better? |
@JSFB shipit |
Updated docs examples/recommendations to use findDOMNode instead of getDOMNode
Updated docs examples/recommendations to use findDOMNode instead of getDOMNode