Skip to content

Update components to use fat arrow functionsΒ #142

@bfbachmann

Description

@bfbachmann

Currently we define our class functions like this

class MyClass extends Component {
    constructor(props) {
        ...

        this.myFunction = this.myFunction.bind(this);
    }

    myFunction(args) {
        ...
    }
}

We should instead define our functions like this

class MyClass extends Component {
    constructor(props) {
        ...
    }

    myFunction: (args) => {
        ...
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions