Skip to content

Conversation

@bsaphier
Copy link
Contributor

@bsaphier bsaphier commented Feb 1, 2017

using refs with a string is mentioned as bad-practice in the React docs, so i refactored the P5Wrapper component to align with the doc's suggestions

From the docs:

If you worked with React before, you might be familiar with an older API where the ref attribute is a string, like "textInput", and the DOM node is accessed as this.refs.textInput. We advise against it because string refs have some issues, are considered legacy, and are likely to be removed in one of the future releases. If you're currently using this.refs.textInput to access refs, we recommend the callback pattern instead.
https://facebook.github.io/react/docs/refs-and-the-dom.html

@and-who and-who merged commit 344d4f3 into P5-wrapper:master Feb 3, 2017
and-who pushed a commit that referenced this pull request Aug 14, 2020
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

Successfully merging this pull request may close these issues.

2 participants