ts-react-loader icon indicating copy to clipboard operation
ts-react-loader copied to clipboard

Add support for stateless function components

Open grncdr opened this issue 7 years ago • 0 comments

Scan the AST for functions matching the following criteria:

  • either declared or assigned to top-level constants
  • return type includes React.Element
  • takes one or two arguments (2 for context)

Then insert statements after the containing statement adding propTypes and contextTypes properties.

grncdr avatar Nov 27 '17 22:11 grncdr