react-native-url-polyfill icon indicating copy to clipboard operation
react-native-url-polyfill copied to clipboard

Support for React Native Web

Open charpeni opened this issue 4 years ago • 0 comments

Currently, this library isn't working well with react-native-web because we depend on polyfillGlobals from React Native:

https://github.com/charpeni/react-native-url-polyfill/blob/857044666d563b0558b2fd6e23d5736e620108e3/index.js#L3

We could easily bypass this with a Platform.OS check and fallback on applying polyfills directly on globalThis for the web platform. But should we?

What should be the behavior when you use the auto-import or setupURLPolyfill with react-native-web?

  • No op
  • Fallback to globalThis instead of using polyfillGlobals

charpeni avatar Sep 27 '21 20:09 charpeni