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

[Core] Replace string refs with callback refs #3436

Closed
newoga opened this issue Feb 23, 2016 · 3 comments
Closed

[Core] Replace string refs with callback refs #3436

newoga opened this issue Feb 23, 2016 · 3 comments

Comments

@newoga
Copy link
Contributor

newoga commented Feb 23, 2016

React docs says the following about string refs:

React also supports using a string (instead of a callback) as a ref prop on any component, although this approach is mostly legacy at this point.

There are also React issues that indicate string refs will eventually be deprecated. We should consider moving to callback refs when we're able to do so.

@alitaheri
Copy link
Member

Yeah I agree with you 👍 👍

@oliviertassinari
Copy link
Member

oliviertassinari commented Jul 23, 2016

This issue is beeing addressed in the next branch. To have more context on why it's bad, you can have a look at https://news.ycombinator.com/edit?id=12093234
We should make sure that the corresponding eslint rule is enforced.

@oliviertassinari oliviertassinari added this to the 0.16.0 Release milestone Jul 23, 2016
oliviertassinari added a commit that referenced this issue Jul 24, 2016
@oliviertassinari
Copy link
Member

As pointed out by @gulderov, the no-string-refs eslint rule is now enforced. We can close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants