Skip to content

Unnecessary binding #10

@sofiapoh

Description

@sofiapoh

https://github.com/fac-12/Lex/blob/3f591db5c8a96556abc357c622929633afc5adf3/src/components/App.js#L54

and

https://github.com/fac-12/Lex/blob/3f591db5c8a96556abc357c622929633afc5adf3/src/components/App.js#L56

When the functions are defined with arrow function () => {} instead of using the function keyword they have access to the context in which they were defined. In this case this refers to the App class and no binding to the context outside is needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions