title: "inputRef" while integrating third party libraries with material-ui
body: <p>The <a href="https://material-ui.com/components/text-fields/#integration-with-3rd-party-input-libraries" rel="nofollow noreferrer">documentation</a> in material ui shows an example on how to integrate the Input component with 3rd party libraries(react-text-mask in this case).</p>
  
  <p>saw the below lines of code which I failed to understand</p>
  
  <pre><code>ref={ref =&gt; {
          inputRef(ref ? ref.inputElement : null);
        }}
  </code></pre>
  
  <ol>
  <li>Why is the <strong>inputRef</strong> method invoked here?</li>
  <li>What does <strong>ref.inputElement</strong> return?</li>
  </ol>
  
  <p>Attaching the codesandbox <a href="https://codesandbox.io/s/material-demo-5tb95" rel="nofollow noreferrer">here</a></p>