title: Warning findDomNode
body: <p>I was trying to make a select menu with material-ui and React</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const SelectLevelButton = forwardRef((props, ref) =&gt; {
    const [stateLevel, setStateLevel] = useState({
      level: "Easy"
    });
  
    const [stateMenu, setStateMenu] = useState({
      isOpen: false
    });
  
    const openMenuHandler = () =&gt; {
      setStateMenu({
        isOpen: true
      });
    };
  
    const closeMenuHandler = () =&gt; {
      setStateMenu({
        isOpen: false
      });
    };
  
    const buttonRef = useRef();
  
    console.log(buttonRef.current);
  
    return (
      &lt;&gt;
        &lt;Menu open={stateMenu.isOpen} anchorEl={buttonRef.current} onClose={closeMenuHandler}&gt;
          &lt;MenuItem&gt;Easy&lt;/MenuItem&gt;
          &lt;MenuItem&gt;Normal&lt;/MenuItem&gt;
          &lt;MenuItem&gt;Hard&lt;/MenuItem&gt;
        &lt;/Menu&gt;
        &lt;div ref={buttonRef}&gt;
          &lt;Button onClick={openMenuHandler} color="inherit"&gt;{`Level: ${stateLevel.level}`}&lt;/Button&gt;
        &lt;/div&gt;
      &lt;/&gt;
    );
  });
  
  export default SelectLevelButton;</code></pre>
  </div>
  </div>
  </p>
  
  <p>but when i click on the button to open the menu in console i get this warning:
  Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Transition which is inside StrictMode. Instead, add a ref directly to the element you want to reference.</p>
  
  <p>How can i solved that?</p>