Closed pablocubico closed 8 years ago
Not sure to understand why this is failing with string refs, but I definitely agree to change all string refs for string callbacks ;)
Do you want to help on this? A PR is very welcome :)
The problems of string refs have been outlined in an answer here by Dan Abramov, check out specially the last two points (3 & 4):
https://news.ycombinator.com/item?id=12090484
I'll make a PR.
I'm getting a few errors on components using string refs, as Dialog and Textfield.
See: https://facebook.github.io/react/warnings/refs-must-have-owner.html (not very helpful)
I solved it by using callback refs instead of string refs. Example here:
https://github.com/tleunen/react-mdl/compare/master...pablocubico:using-callback-refs-instead-of-strings?expand=1
String refs are on its way to deprecation as mentioned in:
@tleunen Would you agree on switching all string refs to callbacks?