flatMap is not a function on iOS 10
See original GitHub issueReact Native version:
0.59.10
Steps To Reproduce
- Run your app on iOS 10
- Use Array.prototype.flatMap, e.g. [].flatMap(item => item)
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:
Issue Analytics
- State:
- Created 4 years ago
- Reactions:14
- Comments:9
Top Results From Across the Web
flatMap method over array - (flatMap is not a function)
The flatMap() method first maps each element using a mapping function, then flattens the result into a new array. It is identical to...
Read more >Array.prototype.flatMap() - JavaScript - MDN Web Docs
The flatMap() method returns a new array formed by applying a given callback function to each element of the array, and then flattening...
Read more >e.children.flatMap is not a function? : r/AmazonFlexDrivers
children. flatMap is not a function. I keep closing the app and trying again. One time upon opening, a pop-up appeared above the...
Read more >flatMap(_:) | Apple Developer Documentation
Returns an array containing the concatenated results of calling the given transformation with each element of this sequence.
Read more >TypeError: flatMap is not a function in JavaScript | bobbyhadz
To solve the "flatMap is not a function" error, make sure to only call the flatMap method on arrays and in browsers that...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

To support iOS 11 and below, you can add
array-flat-polyfillto your project, then add to yourApp.js:It will only add the polyfill, if it doesn’t already exist.
This is happening in RN version 0.60.4 too
Edit Now I’m seeing the issue on iOS 11 also, with
"react-native": "0.61.4"