-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
flatMap is not a function on iOS 10 #26283
Comments
This is happening in RN version 0.60.4 too Edit |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
Still seeing this on react native 0.61.5 iOS 11 |
I am seeing this on iOS 11.3 and Expo 36 version of React native. |
Seems flatMap will work iOS 12 and above only. Safari iOS added support from iOS 12 onwards - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap |
How would you configure react-native to use a polyfill for flatMap on systems that don't support it? |
To support iOS 11 and below, you can add import 'array-flat-polyfill' It will only add the polyfill, if it doesn't already exist. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
-- NEEDS CURRENT USAGE NUMBERS AND A REASON FOR BUMPING GRACEFUL DEGRADATION THRESHOLD -- We'd like to use `Array.prototype.flatMap`, which it seems won't work in React Native on iOS until iOS 12. This was noted in a comment [1] on facebook/react-native#26283. While the reasoning there wasn't as thorough as we'd like, we looked closer [2], and we believe the conclusion is correct. [1] facebook/react-native#26283 (comment) [2] https://chat.zulip.org/#narrow/stream/48-mobile/topic/platform.20versions/near/1163034
We'd like to use `Array.prototype.flatMap`, which it seems won't work in React Native on iOS until iOS 12. This was noted in a comment [1] on facebook/react-native#26283. While the reasoning there wasn't as thorough as we'd like, we looked closer [2], and we believe the conclusion is correct. A fresh look at iOS installations by platform (or the proxy we use for that, anyway) [3] shows iOS 11 usage is 0.1% of our iOS usage, so this should be fine to do. Also, 5.9% of our iOS users are on iOS <= 13, so graceful degradation at that level is fine. [1] facebook/react-native#26283 (comment) [2] https://chat.zulip.org/#narrow/stream/48-mobile/topic/platform.20versions/near/1163034 [3] https://chat.zulip.org/#narrow/stream/48-mobile/topic/platform.20versions/near/1164857
React Native version:
0.59.10
Steps To Reproduce
Describe what you expected to happen:
Should work like on other OS and platforms
Probably other new ES features don't work too
Snack, code example, screenshot, or link to a repository:
The text was updated successfully, but these errors were encountered: