Skip to content

Update your code to use ES2015 (ES6) #4

@glortho

Description

@glortho

Looking through your code I see places where you can use the following ES6 features:

  • Shortened method definitions
  • Arrow functions (if not for issues around this, at least for more concise code)
  • Block-scoped variables: const and let. Note: Use const except when you absolutely need let.
  • Classes: React offers the React.Component parent class. Warning: After you switch to classes this is no longer automatically bound! Read up on this with regards to React "autobinding."
  • Rest/spread: You can use this at least in the context of passing down state/props, if not elsewhere.
  • Module exports

Optional: Destructuring.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions