<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gaearon/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gaearon">@gaearon</a> You're <a href="https://github.com/facebook/react/issues/9328" data-hovercard-type="issue" data-hovercard-url="/facebook/react/issues/9328/hovercard">arguing</a> that <code class="notranslate">ref</code> functions need to be called twice (once with <code class="notranslate">null</code>) <em>due to internal implementation details that are insignificant with respect to how end users use React</em>.</p>
<p dir="auto">End user don't care how their ref functions are called, just that they work. Honestly having them called twice is strange from a perspective of an end-user who knows nothing about React's internal implementation.</p>
<p dir="auto">You haven't stated why end users <em>actually need</em> to guard against <code class="notranslate">null</code> values from duplicate calls to ref functions. It only complicates end-user code.</p>
<p dir="auto">I would urge for the internal implementation to be modified to stop calling ref functions twice.</p>