You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Promise.allSettled()// es2020, TypeError: undefined is not a functionstr.matchAll(/regex/g)// es2020Symbol.matchAll// es2020String.prototype.replaceAll// es2021Promise.any()// es2020, TypeError: undefined is not a function
but React Native use then/promise module to polyfill Promise and new methods of Promise not available
never mind what engine and how fresh is it (react-native-v8, JSC (iOS 15+), hermes-engine),
new Promise methods will be always undefined (RN uses a 2 years old then/promise module)
Introduction
Add polyfills for:
Promise.allSettled
Promise.any
Details
Latest Hermes engine already implement
es2020
,es2021
methods,react-native-v8
also,JCS
too:but React Native use
then/promise
module to polyfillPromise
and new methods ofPromise
not availablenever mind what engine and how fresh is it (
react-native-v8
,JSC (iOS 15+)
,hermes-engine
),new
Promise
methods will be alwaysundefined
(RN uses a 2 years oldthen/promise
module)See tabel: https://retyui.github.io/react-native-compat-table/
Discussion points
then/promise
The text was updated successfully, but these errors were encountered: