Skip to content

Type annotation with flow syntax and defaulting of args is breaking React Class validator #284

@robinwkurtz

Description

@robinwkurtz

Hello,

Thanks for your library!

I ran into an issue where a option (flow annotation) argument in a handler was causing my class to not be parsed.. resulting in You have to export at least one valid React Class!. Defaulting the arg also seems to break things.

Breaks:

handleThings = (id: number, active?: boolean) => () => {
   things..
}
handleThings = (id: number, active: boolean = false) => () => {
   things..
}

Works:

handleThings = (id: number, active: boolean) => () => {
   things..
}

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions