Search code examples
google-chromereactjssyntaxecmascript-6transpiler

Are transpilers still needed for ecma6 and react?


I am using a babel transpiler for react ecma6 projects ,but It seems that chrome already supports ecma6 functions, methods and syntax. Is the transpiler really needed. syntax wize, what is the traspiler part in the workflow? Which functions or methods arent supported in chrome?


Solution

  • I agree with Mario about http://caniuse.com/, and you can get more detail on https://developer.mozilla.org/en-US/docs/Web/JavaScript for each browser feature you may need.

    Always consider your lowest common demoninator. Usually IE, but sometimes that depends these days with FF, Safari mobile, etcetera. If your lowest required browser/platform does not support the feature, you can use something like a Babble module to transpile on-the-fly, or just grab the polyfills from MDN which usually has well written and maintained code.

    About polyfills - in case you venture to write your own: