Alt @decorators in React-Native

- 1 answer

Ad

I am using the Alt library (Flux implementation) with React-Native. I really like the 'alt/utils/decorators' and 'alt/utils/connectToStores' but I cannot use these @decorators because the RN/Babel config doesn't seem to support it.

I'm definitely not well versed in Babel (or RN for that matter) so I am in need of help configuring RN/Babel to work with @decorators.

How can I use the Alt library's @decorators with React-Native?

Ad

Answer

Ad

Babel 6 currently intends for the transform-decorators to support the upcoming change to the decorators proposal, which will make it behave quite differently from the existing one.

If you need decorators in Babel 6 with the same semantics as decorators in Babel 5, your best option is to use babel-plugin-transform-decorators-legacy.

Ad
source: stackoverflow.com
Ad