Skip to content

Commit 8444926

Browse files
authored
Update README.md
1 parent 8570446 commit 8444926

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
<hr />
3232

33-
react-native-url-polyfill is a full implementation of the WHATWG [URL Standard](https://url.spec.whatwg.org/) optimized for React Native.
33+
react-native-url-polyfill is an implementation of the WHATWG [URL Standard](https://url.spec.whatwg.org/) optimized for React Native.
3434

3535
- **Lightweight**. Uses a forked version of [`whatwg-url`](https://github.com/jsdom/whatwg-url) ([`whatwg-url-without-unicode`](https://github.com/charpeni/whatwg-url)) where unicode support has been stripped out — Going down from [372 KB](https://bundlephobia.com/[email protected]) to [40.9 KB](https://bundlephobia.com/[email protected]).
3636
- **Trustworthy**. Follows closely the URL Standard spec, and relys on unit tests and Detox e2e tests within [React Native](https://github.com/facebook/react-native).
@@ -50,10 +50,10 @@ Meanwhile, React Native has grown around that polyfill, then some unexpected err
5050
> - URL incorrectly adds trailing slash [react-native#24428](https://github.com/facebook/react-native/issues/24428).
5151
> - Creating an instance of URL like: `new URL('http://facebook.com')` throws an exception [react-native#16434](https://github.com/facebook/react-native/issues/16434).
5252
53-
Unfortunately, adding `react-native-url-polyfill` to React Native source code will means adding 📦 **78.78 KB** (as of RN 0.65) to the JavaScript bundle.
54-
5553
That's why you may need this external dependency. So, if you use `URL` within your app, you probably want to take a look at the installation steps below!
5654

55+
Unfortunately, adding `react-native-url-polyfill` to React Native source code will means adding 📦 **78.78 KB** (as of RN 0.65) to the JavaScript bundle, that's why it's not included by default.
56+
5757
## Installation
5858

5959
First, you need to install the polyfill, which can be done with [Yarn](https://yarnpkg.com/) or [npm](https://www.npmjs.com/).
@@ -99,7 +99,7 @@ import { setupURLPolyfill } from 'react-native-url-polyfill';
9999
setupURLPolyfill();
100100
```
101101

102-
### Option 3 (_Convenient_)
102+
### Option 3 (_Convenient_ / ponyfill)
103103

104104
If you prefer not to apply this polyfill over React Native's default `URL`, you can still import those classes manually when you want them.
105105

0 commit comments

Comments
 (0)