mauricevancooten / react-anchor-link-smooth-scroll

React component for anchor links using the smooth scroll polyfill.
243 stars 31 forks source link

componentWillReceiveProps deprecated #37

Open elliott-w opened 3 years ago

elliott-w commented 3 years ago

Using react v17.0.1 and react-dom v17.0.1, I'm getting the following error:

Warning: Unsafe legacy lifecycles will not be called for components using new component APIs.

Scrollchor uses getDerivedStateFromProps() but also contains the following legacy lifecycles: componentWillReceiveProps

The above lifecycles should be removed. Learn more about this warning here: https://reactjs.org/link/unsafe-component-lifecycles