Skip to content

Commit

Permalink
chore: removed outdated info about isomorphic-fetch on README
Browse files Browse the repository at this point in the history
  • Loading branch information
lquixada committed May 21, 2023
1 parent 5f452e0 commit b26b0c9
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@ Universal WHATWG Fetch API for Node, Browsers and React Native. The scenario tha

## Table of Contents

- [Install](#install)
- [Usage](#usage)
- [Demo & API](#demo--api)
- [FAQ](#faq)
- [Thanks](#thanks)
- [License](#license)
- [Author](#author)
- [](#)
- [Table of Contents](#table-of-contents)
- [Install](#install)
- [Usage](#usage)
- [Demo \& API](#demo--api)
- [FAQ](#faq)
- [Yet another fetch library?](#yet-another-fetch-library)
- [Why polyfill might not be a good idea?](#why-polyfill-might-not-be-a-good-idea)
- [How does cross-fetch work?](#how-does-cross-fetch-work)
- [Who's Using It?](#whos-using-it)
- [Thanks](#thanks)
- [License](#license)
- [Author](#author)

* * *

Expand Down Expand Up @@ -126,17 +132,10 @@ You can find a comprehensive doc at [Github's fetch](https://github.github.io/fe

I did a lot of research in order to find a fetch library that could be simple, cross-platform and provide polyfill as an option. There's a plethora of libs out there but none could match those requirements.


#### Why not isomorphic-fetch?

My preferred library used to be [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch) but it has this [bug](https://github.com/matthew-andrews/isomorphic-fetch/issues/125) that prevents it from running in a react native environment. It seems unlikely to be fixed since there haven't been any new commits to it since 2016. That means dependencies are outdated as well.


#### Why polyfill might not be a good idea?

In a word? Risk. If the spec changes in the future, it might be problematic to debug. Read more about it on [sindresorhus's ponyfill](https://github.com/sindresorhus/ponyfill#how-are-ponyfills-better-than-polyfills) page. It's up to you if you're fine with it or not.


#### How does cross-fetch work?

Just like isomorphic-fetch, it is just a proxy. If you're in node, it delivers you the [node-fetch](https://github.com/bitinn/node-fetch/) library, if you're in a browser or React Native, it delivers you the github's [whatwg-fetch](https://github.com/github/fetch/). The same strategy applies whether you're using polyfill or ponyfill.
Expand Down

0 comments on commit b26b0c9

Please sign in to comment.