Npm - fetch vs node-fetch?

Viewed 4349

These package names are pretty confusing, they seem like they do the same thing yet 'fetch' looks to be abandoned yet not marked as deprecated (last commit 3 years ago). Judging from the download counts people are probably downloading 'fetch' when they should get the supported and maintained 'node-fetch' package.

If you're building a Reactjs app, is fetch already built in? If so, is it different than 'node-fetch'?

What is the suggested package npm users should use?

https://www.npmjs.com/package/fetch

https://www.npmjs.com/package/node-fetch

1 Answers

Both does the same thing, only difference what i see is node-fetch is compatible API on Node.js runtime, fetch is more specific to browser.

Related