This is because the third party library is using componentWillReceiveProps - componentWillReceiveProps gets automatically renamed to UNSAFE_componentWillReceiveProps. This happens because those methods are now considered legacy code and React is deprecating that lifecycle method as well as others.
Unfortunately, their isn't an immediate solution.
- You can fork the code and update it yourself
- Start an issue on the code's GIT page and hope the update their maintainer fixes the issue.
- Find another library to do the same job.
- Write custom logic to do the same thing as the library
- Use the library and hope they fix it before it's deprecated by React.
the error caused by the third-party library (next-redux-wrapper) about Legacy Lifecycle Methods (UNSAFE), the previous name is componentWillReceiveProps, That name will continue to work until version 17.
to fix it
you can use the react-codemod to automatically update your components. and use rename-unsafe-lifecycles property
npx react-codemod rename-unsafe-lifecycles <path>
my path to a third party library is
path=./node_module/next-redux-wrapper/lib/index.js
thank you