-
Notifications
You must be signed in to change notification settings - Fork 69
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
React Native 0.16.0 won't work with decorators #53
Comments
0.16 is unfortunately going to break a lot of existing projects for this specific reason. Until there's a Babel 6 port of the Babel 5 decorators plugin, a lot of early adopters of RN are stuck. Looking into the complexity of writing the plugin, my current thinking is the best way forward is for someone who works on Babel to add support for Babel 5 decorators. Facebook doesn't use decorators but insofar as they care about open source and the external community, fixing decorators would simultaneously boost Babel 6 adoption and RN 0.16 adoption. Specifically for RN 0.16, several early adopters who have been providing feedback and helping improve RN aren't going to be using the latest releases. If you can help convince Facebook / Babel experts to implement support for decorators that'd be great. But open source is not Facebook's primary mission either so it's kind of a hard sell. |
I see, that's quite unfortunate. Have you thought about removing the requirement for decorators in this repo? As far as I can tell it is just a couple of |
I'm not 100% sure but the binding semantics of class properties might change too. It's probably the right short term solution to manually bind in the constructor but fixing the Babel issue is a scalable solution. |
RN 0.16.0 comes with Babel 6. So for one thing the syntax of all babel.rc files needs changing (right?) and as mentioned in the 0.16.0-rc release message https://github.com/facebook/react-native/releases/tag/v0.16.0-rc:
I tried upgrading my project to the RC and even after changing the syntax of my .babelrc to include
I still get this error:
Any plans around this for when 0.16.0 stable lands?
The text was updated successfully, but these errors were encountered: