Alternative to "mostly legacy" ref String Attribute?
<p>I was a bit surprised when I read the updated React <a href="https://facebook.github.io/react/docs/more-about-refs.html" rel="noreferrer">docs about refs</a>. While their examples on the React front page still use <code>this.refs.textarea</code>, they later "recommend" to not use this approach anymore.</p>

<p>But what's the alternative? I find too long inline code confusing and calling a function instead, like <code>{() =&gt; this.initChartLibrary() }</code> (the <code>() =&gt;</code> is required to not lose context to <code>this</code>) requires to build a method that gives the wrong impression of that it can be reused.</p>

<p>In other words, I'd still like to use the String way. But since I fear they'll deprecate it, I was wondering, if there are any other approaches?</p>