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

Fix transpilation error to support React Native #790

Merged
merged 1 commit into from May 26, 2016

Conversation

clarle
Copy link
Contributor

@clarle clarle commented May 25, 2016

Recent versions of Babel will throw a TransformError in certain runtimes if any property on Symbol is assigned a value using dot notation, which includes React Native. This makes sense, since you probably don't want to be assigning values on top of existing symbols anyway in environments that already support them.

screen shot 2016-05-25 at 12 53 43 am

This retains the same polyfilling behavior for platforms without Symbol.for and Symbol.observable, but lets Babel properly transpile.

With the change to Falcor to support Promise shimming merged in, this is the last remaining issue needed to support React Native in 1.x. Fixes #603.

@jhusain @sdesai @ktrott

Recent versions of Babel will throw a TransformError in certain
runtimes if any property on `Symbol` is assigned a value.

This fixes the issue, which is the last remaining issue for
React Native support.
@coveralls
Copy link

coveralls commented May 25, 2016

Coverage Status

Coverage remained the same at 91.562% when pulling d086602 on clarle:react-native-babel into 3b287e3 on Netflix:master.

@sdesai
Copy link
Contributor

sdesai commented May 25, 2016

Looks fine to me if it gets us by Babel. All the native symbols (iterator, match, etc.) seem to be "writable:false" natively.

It seems to be heavy handed with Symbol.for but that's fine [ I imagine that's just a 'less transpiler implementation complexity' call ].

Will give Jafar a little to comment, otherwise will merge later today

@sdesai sdesai merged commit ac368b7 into Netflix:master May 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants