thibaudcolas/react-destructuring-assignment-codemod

Work in progress

Opened this issue · 0 comments

This is a work in progress. I case I ever pick it up further, here is where things are at.

  • Class components
  • SFCs
  • PureComponent?
  • Simple conversions of props only
  • Check the new variables don't shadow existing vars
  • Remove duplicate var declarations
  • Extend existing destructuring if there is any
  • Do not destructure in SFCs if code uses props directly
  • Do not put the destructuring as first line of functions for constructor methods
  • Do not destructure in the function params for constructor methods