Skip to content

Add support for stateless function components #3

Description

@grncdr

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions