Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Syntax Decorators #309

Closed
sanketsahu opened this issue Jul 31, 2016 · 2 comments
Closed

Support for Syntax Decorators #309

sanketsahu opened this issue Jul 31, 2016 · 2 comments

Comments

@sanketsahu
Copy link

sanketsahu commented Jul 31, 2016

Note from maintainers

For people coming to this thread later—if you use MobX or a similar library, you don’t need decorators. They are just syntax sugar in this case.
Learn more: #214 (comment), #411 (comment).
Here is why we don’t include them: #411 (comment).

I want to use Babel Syntax Decorators AKA ES7 JavaScript Decorators which is currently not a part of this project.

I believe it is really important and decorators are being a common practice for most of the React projects (esp MobX like projects).

I can submit a pull-request if needed. Please let me know.

@gaearon
Copy link
Contributor

gaearon commented Jul 31, 2016

Hi, please search the issues to find previous discussions on this topic. We’re happy to support decorators after the spec advances, and they are officially supported in Babel without the -legacy plugin. And MobX works fine without decorators.

@gaearon
Copy link
Contributor

gaearon commented Aug 15, 2017

For anyone reading this in the future, I would like to point out that the decorators spec has changed significantly. I'm really glad we made the decision to not support them at early stage, so users who didn't eject don't need to change their code.

I don't recommend anyone to rely on the legacy decorator transform (that is not part of CRA). See this thread for more info: https://twitter.com/dan_abramov/status/897491076537356288.

@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants