News for hackers. Stuff that matters.
Re:Overview of JavaScript ES6 features by jaquers on Monday October 24, 2016 @09:47AM (#12778702)
Indeed. Are there any 'good' strategies for this (loading ES6 for supported browsers)? I imagine you'd have to do UA sniffing on the server side, and I suppose it's kind of a moot point if you're using React/JSX.
Re:Overview of JavaScript ES6 features by Tankenstein on Monday October 24, 2016 @09:49AM (#12778713)
There's no need unless you need runtime-only concepts, like new string methods. Use https://babeljs.io/ to turn nice es6 into es5. (I imagine you already know this, if you're using react/jsx)
Re:Overview of JavaScript ES6 features by megous on Monday October 24, 2016 @11:12AM (#12779499)
Just try to eval a sample of ES6 syntax you use, and if it throws error, load ES5 code. You'd need to feature check all the features that you use, to cover the browser versions with incomplete ES6 support.
Re:Overview of JavaScript ES6 features by hzoo on Monday October 24, 2016 @05:20PM (#12783016)
Working on https://github.com/babel/babel-preset-env right now which should help with this