title: Error: Function components cannot have string refs. We recommend using useRef() instead
body: <p>Im using ace Editor in my react app and am getting the above error. I want to put the contents of the Ace Editor IDE that im using in my react app from a function call which is triggered through a submit button.</p>
  <pre><code>&lt;AceEditor
  ref='aceEditor'
  height='100%'
  width='100%'
  mode={ideLanguage}
  theme={ideTheme}
  fontSize={ideFontSize}
  showGutter={true}
  showPrintMargin={false}/&gt;
  </code></pre>
  <p>And this is the button</p>
  <pre><code>&lt;Button
  type='button'
  buttonStyle='btn--primary--normal'
  buttonSize='btn--medium'
  onClick={SendCode}
  &gt;SUBMIT&lt;/Button&gt;
  </code></pre>
  <p>And this is the function</p>
  <pre><code>const SendCode = () =&gt; {
    console.log(this.refs.aceEditor.editor.getValue());
  };
  </code></pre>
  <p>What am I doing wrong??</p>