Skip to content

GuillaumeSarfati/babel-plugin-react-rename-unsafe-lifecycle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

babel-plugin-react-rename-unsafe-lifecycle

Rename unsafe react lifecycle: componentWillMount by UNSAFE_componentWillMount, componentWillReceiveProps by UNSAFE_componentWillReceiveProps and componentWillUpdate by UNSAFE_componentWillUpdate

Update your .babelrc if you want to continue using componentWill*

{
  "plugins": [
    ["react-rename-unsafe-lifecycle"]
  ]
}

Update Your package.json if you want to update your node_modules

{
  "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 ;)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published