<div dir="ltr"><div><div><div><div>As part of my work with Preact (and previous work with React), I've been unsure what to do about these libraries' enthusiasm for ES6.<br><br></div>If you're not familiar, ES6 (or ES2015) is a recent, major update to the JavaScript standard, and brings in a number of improvements to the language. Many of these make small parts of JS development a bit more pleasant, but the most relevant addition is native class support.<br><br>These built-in classes have been embraced by a lot of modern JS libraries, including Preact. The commonly accepted way to write code in this libraries depends on support for classes, either from the browser itself or a transpiler like Babel. To use Preact, we have two options:<br><br></div>  * Use ES6 classes. This will work in Firefox 45+ (which includes two ESR releases), Chrome 42+, Edge and Safari 9 [1][2]. I believe this is a very reasonable set of browsers, for the staff client.<br></div>  * Use a shim for ES3 support (see [3] for an example of how this might work). This can be done, but locks us to an older and less-used way of developing on Preact/React.<br><br></div>I strongly prefer the first option, but would like your feedback.<br><div><br>[1] <a href="http://kangax.github.io/compat-table/es6/#test-class">http://kangax.github.io/compat-table/es6/#test-class</a> (Check "show obsolete platforms", and get ready for your browser to slow down.)<br>[2] <a href="http://caniuse.com/#feat=es6-class">http://caniuse.com/#feat=es6-class</a> (This is pessimistic; FF has had support since version 45.)<br>[3] <a href="https://github.com/developit/preact-in-es3/blob/master/index.js">https://github.com/developit/preact-in-es3/blob/master/index.js</a><br><div><br clear="all"><div><div><div><br>-- <br><div class="gmail_signature">Jesse Weaver</div>
</div></div></div></div></div></div>