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

Confusion as to which Map to use #4396

Closed
ghost opened this issue Nov 28, 2015 · 2 comments
Closed

Confusion as to which Map to use #4396

ghost opened this issue Nov 28, 2015 · 2 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@ghost
Copy link

ghost commented Nov 28, 2015

There is Map that react-native uses internally and was available via require('Map'), OTOH, babel that processes react-native code provides its own polyfill.

The confusion leads to issues such as oney/react-native-gcm-android#4. The fix is ugly, using internal part of react-native. What is the right thing here? Should global Map be used, as babel's version is good enough (in that case, wouldn't it be better to just drop the react-native internal polyfill?). Should Map be exported by react-native (like const {Component, ...., Map} = React;)?

@facebook-github-bot
Copy link
Contributor

Hey herby, thanks for reporting this issue!

React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.

  • If this is a feature request or a bug that you would like to be fixed by the team, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
  • If you don't know how to do something or not sure whether some behavior is expected or a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
  • We welcome clear issues and PRs that are ready for in-depth discussion; thank you for your contributions!

@ide
Copy link
Contributor

ide commented Nov 28, 2015

OTOH, babel that processes react-native code provides its own polyfill.

Could you verify this is actually the case? To my knowledge the babel-runtime plugin is excluded (https://github.com/facebook/react-native/blob/master/packager/react-packager/.babelrc), so RN's Map polyfill is the only Map. You should access Map globally in the same way you'd access Array or Math or Promise globally.

@ide ide closed this as completed Nov 28, 2015
@facebook facebook locked as resolved and limited conversation to collaborators Jul 20, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants