React has deprecated some APIs in favor of new approaches that will better support the future, concurrent model for rendering. These deprecated APIs will eventually be removed, so it makes sense to avoid them in new code and move away from them in existing code. In this lesson, we’ll wrap our boilerplate application in the StrictMode component and see it in action.
For now life-cycle methods are just legacy, not deprecated https://github.com/yannickcr/eslint-plugin-react/pull/1750#issuecomment-425975934
I'm not getting the error about componentWillMount
being deprecated. Using react 16.7.0
No get the error message about componentWillMount of using react16.8.2 version, too.
This is because you need to be using 17 and above to get the error.
I only get the deprecation error when I remove settings: {react: {version: 'xx.xx.x'}}
from .eslintrc.json
.
So, should we add react {version: 'xx.xx.x'}
or not ?
This is working settings for legacy features like componentWillMount
"settings": {
"react": {
"version": "16.999.0"
}
},