Rename unsafe react lifecycle: componentWillMount by UNSAFE_componentWillMount, componentWillReceiveProps by UNSAFE_componentWillReceiveProps and componentWillUpdate by UNSAFE_componentWillUpdate
npm install babel-plugin-react-rename-unsafe-lifecycleRename unsafe react lifecycle: componentWillMount by UNSAFE_componentWillMount, componentWillReceiveProps by UNSAFE_componentWillReceiveProps and componentWillUpdate by UNSAFE_componentWillUpdate
``json`
{
"plugins": [
["react-rename-unsafe-lifecycle"]
]
}
`json
{
"scripts": {
"postinstall": "jscodeshift --silent --babel --transform ./node_modules/babel-plugin-react-rename-unsafe-lifecycle/lib/rename-unsafe-lifecycles.js /react-/*.js --ignore-pattern /react-native/",
}
}
``
Thx to jscodeshift ;)