Sign in
Log inSign up

Why are string refs considered legacy in React?

Harry Vijay's photo
Harry Vijay
·Sep 13, 2016

If you look at React documentation on React refs here, it clearly states that

Although string refs are not deprecated, they are considered legacy, and will likely be deprecated at some point in the future. Callback refs are preferred.

Although it doesn’t explain why this is the case. I find ref strings to be more easily useable than the callbacks. Any explanation on this would be great! Thanks