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

More explicit class method for ref doc #10228

Merged
merged 1 commit into from Sep 10, 2017
Merged

Conversation

hartzis
Copy link
Contributor

@hartzis hartzis commented Jul 20, 2017

After realizing this was the second time I've visited this exact page within a year and second guessing myself that the textInput ref isn't actually the <input /> element; I'd like to submit this PR to attempt to make this more explicit.

You are actually accessing the method on the child class and not the focus method on the dom input element.

Having the methods named the same, focus, caused some confusion.

After realizing this was the second time I've visited this exact page within a year and second guessing myself that the `textInput` ref isn't actually the `<input />` element. I decided to attempt to make this a little more explicit; you are actually accessing the method on the child class and not the `focus` method on the dom input element. Having them named the same caused some confusion.
Copy link
Collaborator

@sophiebits sophiebits left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@sophiebits sophiebits merged commit 6d37c05 into facebook:master Sep 10, 2017
sophiebits pushed a commit that referenced this pull request Sep 10, 2017
After realizing this was the second time I've visited this exact page within a year and second guessing myself that the `textInput` ref isn't actually the `<input />` element. I decided to attempt to make this a little more explicit; you are actually accessing the method on the child class and not the `focus` method on the dom input element. Having them named the same caused some confusion.

(cherry picked from commit 6d37c05)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants