React.js Decorators are not supported yet in 6.x pending proposal update

Erkan Demir picture Erkan Demir · Nov 23, 2015 · Viewed 8k times · Source

The technologies that i am using to build my app is React, Web-pack, Babel and AlT(flux implementation)

I'm getting an error when web pack tries to compile my app. Not sure what libraries i am missing.

Could someone please advice ?

  ##.babelrc file##
  {"presets": ["react", "es2015", "stage-0"]}

Screen Shot

Answer

Qiming picture Qiming · Dec 22, 2015

The answer is mostly provided here https://stackoverflow.com/a/34210231/, but I'll recount it here for convenience:

Basically, you TC39 is changing the proposal so Babel is holding off on implementing decorators. If you want the Babel 5 version of decorators (or something similar), you can add this special plugin to Babel - https://www.npmjs.com/package/babel-plugin-transform-decorators-legacy.