Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to ES6 #114

Open
nadimkobeissi opened this issue May 9, 2016 · 0 comments
Open

Migrate to ES6 #114

nadimkobeissi opened this issue May 9, 2016 · 0 comments
Assignees

Comments

@nadimkobeissi
Copy link
Contributor

nadimkobeissi commented May 9, 2016

Items of interest:

  • Block-scoped variables: replace all var with const and let.
  • Arrow functions: including lexical this.
  • Replace .concat and similar with spread operators.
  • String interpolation, especially useful for dialogs and any multiline string.
  • Method properties, useful with React components.
  • .includes, .startsWith, .endsWith and .find instead of .indexOf.
  • Number.isNaN instead of isNaN.
  • Promises instead of callback hell.
  • Object.keys instead of hasOwnProperty.
  • import and export, which are, wow, incredible. Helps separate code into modules without using any global namespace whatsoever.

Might need to enable --harmony command-line parameter for Electron. In terms of compatibility:

Babel could be a last-ditch resort.

@nadimkobeissi nadimkobeissi self-assigned this May 9, 2016
@nadimkobeissi nadimkobeissi modified the milestone: Priority May 11, 2016
@nadimkobeissi nadimkobeissi modified the milestone: Priority Aug 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant