negomi / react-burger-menu

:hamburger: An off-canvas sidebar component with a collection of effects and styles using CSS transitions and SVG path animations
http://negomi.github.io/react-burger-menu/
MIT License
5.05k stars 586 forks source link

Strict mode warnings #311

Closed Limess closed 5 years ago

Limess commented 5 years ago

Issue

When using react-burger-menu I receive the following strict mode warnings in the browser console:

Warning: Unsafe lifecycle methods were found within a strict-mode tree: in StrictMode (at src/index.jsx:15) componentWillMount: Please update the following components to use componentDidMount instead: Menu componentWillReceiveProps: Please update the following components to use static getDerivedStateFromProps instead: Menu Learn more about this warning here: https://fb.me/react-strict-mode-warnings

This may cause issues in future versions of React.

Reproduction

To reproduce, create any small sample app, say App with react-burger-menu and wrap it with

<React.StrictMode>
    <App/>
</React.StrictMode>

when in development mode.