How to use a new ES6, ES7 feature

MD
R
Markdown

Instructions to help deciding if you should include a new ES6, ES7 feature in your project.

1. Check JavaScript Stage of the feature

TC39 Proposals Website.

Keep Away

  1. Stage 0 is a new feature idea
  2. Stage 1 describes the problem and solution with some specification
  3. Stage 2 describes a solid specification for the change using formal language

Safe to be used

  1. Stage 3 implementation starts and feedback from testes using it is required
  2. Stage 4 the feature is done and ready to be officially part of the ECMAScript standard

2. Differentiate between syntactic sugar vs new behavior

If the new feature is just plain syntactic sugar, maybe you are better of not using it.

3. Check MDN or Kanghax for the availability of the feature around the modern browsers (even if you are using a transpiler like Babel)

Kangax List If it's not supported by any browser yet, you are probably better of not using it.

Created on 6/14/2017