material-ui Drawer - findDOMNode is deprecated in StrictMode

后端 未结 4 840
广开言路
广开言路 2020-12-30 18:48

I have a simple ReactJS app based on hooks (no classes) using StrictMode.

I am using React version 16.13.1 and Material-UI version 4.9.10.

In the Appbar I a

4条回答
  •  没有蜡笔的小新
    2020-12-30 19:04

    This is a StrictMode Warning

    Strict mode checks are run in development mode only; they do not impact the production build.

    ReactDOM.render(
      
        
      ,
      document.getElementById('root')
    );
    

    to

    ReactDOM.render(
        ,
      document.getElementById('root')
    );
    

提交回复
热议问题