71

I've seen two different fetch here:

Can someone tell me the difference between the two?

PS: I've read the README.md but I still didn't get the difference. Last time I checked, Isomorphic means it has similar form or relation. It still doesn't make sense to me.

Mark Fisher
  • 965
  • 1
  • 11
  • 30
Joshua Rajandiran
  • 2,788
  • 7
  • 26
  • 53
  • 1
    For more alternatives, see here: https://stackoverflow.com/questions/48433783/referenceerror-fetch-is-not-defined – Venryx Jul 07 '21 at 07:38

2 Answers2

119

FETCH is polyfill for browsers which don't have fetch function (caniuse.com/#search=fetch). It will add fetch function to your browser window object.

While isomorphic-fetch is implementation of fetch for both node.js and browser, built on top of fetch polyfill.

idleberg
  • 12,634
  • 7
  • 43
  • 70
Sergey
  • 1,244
  • 1
  • 9
  • 4
2

The Fetch API is currently not implemented consistently across browsers. This module will enable you to use fetch in your Node code in a cross-browser compliant fashion.

Short answer, isomorphic fetch is a better way of using fetch because it covers a wide range of browsers than the native fetch API.