A light and trustworthy URL polyfill for React Native
react-native-url-polyfill is a full implementation of the WHATWG URL Standard that has been optimized for React Native.
Trustworthy. Follows closely the URL Standard spec, and relys on unit tests and Detox e2e tests within React Native.
Light. Instead of using directly whatwg-url, this polyfill uses a forked version (whatwg-url-without-unicode) where unicode support has been stripped out — Going down from 361 KB to 54 KB.
Blob support. Supports React Native's Blob without additional steps.
Why do we need this?
React Native does include a polyfill for URL, but this polyfill is homemade — in order to keep it light-weight — and was initially created to handle specific use cases.
Meanwhile, React Native has grown around that polyfill, then some unexpected errors have arisen.
Known issues (non-exhaustive) with React Native's URL are: