What is the difference between isomorphic-fetch and fetch?

我的未来我决定 提交于 2019-11-30 13:35:45

问题


I've seen two different fetch here:

  • https://github.com/github/fetch

  • https://github.com/matthew-andrews/isomorphic-fetch

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.


回答1:


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.



来源:https://stackoverflow.com/questions/37936715/what-is-the-difference-between-isomorphic-fetch-and-fetch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!