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.
Yeah I agree with you :+1: :+1:
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.
As pointed out by @gulderov, the no-string-refs eslint rule is now enforced. We can close the issue.
Most helpful comment
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=12093234We should make sure that the corresponding eslint rule is enforced.