[Koha-devel] ES6 usage in the staff client

Tomas Cohen Arazi tomascohen at gmail.com
Fri Aug 4 12:17:39 CEST 2017


I think ES6 is broadly implemented in browsers (even edge) so it wouldn't
make sense to complicate the dev workflow without an obvious gain.

El jue., 3 de ago. de 2017 8:24 PM, Jesse <pianohacker at gmail.com> escribió:

> 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.
>
> 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.
>
> 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:
>
>   * 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.
>   * 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.
>
> I strongly prefer the first option, but would like your feedback.
>
> [1] http://kangax.github.io/compat-table/es6/#test-class (Check "show
> obsolete platforms", and get ready for your browser to slow down.)
> [2] http://caniuse.com/#feat=es6-class (This is pessimistic; FF has had
> support since version 45.)
> [3] https://github.com/developit/preact-in-es3/blob/master/index.js
>
>
> --
> Jesse Weaver
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : http://www.koha-community.org/
> git : http://git.koha-community.org/
> bugs : http://bugs.koha-community.org/

-- 
Tomás Cohen Arazi
Theke Solutions (https://theke.io <http://theke.io/>)
✆ +54 9351 3513384
GPG: B2F3C15F
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20170804/714243bd/attachment.html>


More information about the Koha-devel mailing list