Skip to content

Using this before calling super() #33

@andrewrota

Description

@andrewrota

Classes in ES6 require super() to be called before you can use this in a constructor (now enforced in Babel 5.x), but todo-app.js needs to do this a few times to support property values such as this.events and this.tagName. Is there a way to refactor this so the properties can be initialized after calling super() (though so far I haven't been able to think of a way this would work with Backbone out of the box)?

[UPDATE] Relevant Backbone issue: jashkenas/backbone#3560

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