Skip to content

Proposal: componentMethods option - unintuitive behavior #69

@vemv

Description

@vemv

Hi again!

I tried setting "componentMethods": ["render"], in my .ccarc.

This results in the following:

class template extends Component {
    constructor(props) {
        super(props)
    }
    
    render(){}

    render() {
        return (
            <div className="template"></div>
        );
    }
}

I see two issues here:

  • duplicate render method
  • I didn't specify constructor. Intuition would tell me that for a ["render"] option, that method shouldn't be emitted. It could be emitted for [] (i.e. by default), and for ["constructor", "shouldComponentUpdate"] (i.e. if explicitly specified).

Cheers - Victor

Metadata

Metadata

Assignees

No one assigned

    Labels

    v2Available in v2

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions