Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace isomorphic-fetch with node-fetch #16

Closed
schickling opened this issue Aug 6, 2017 · 6 comments
Closed

Replace isomorphic-fetch with node-fetch #16

schickling opened this issue Aug 6, 2017 · 6 comments

Comments

@schickling
Copy link
Contributor

Given problems as describe in #14 it probably makes sense to replace isomorphic-fetch with node-fetch.

Let's keep this up for discussion for a while to collect feedback/hear objections.

@lquixada
Copy link
Contributor

lquixada commented Sep 3, 2017

@schickling, I don't recommend using node-fetch. Although it works with some browsers, it doesn't on those who doesn't support window.fetch natively such as IE11-. One possible candidate would be whatwg-fetch but it's not suitable for node environments.

isomorphic-fetch found a way to get the best of both worlds but it came with a flaw: a bug that stops it from working on React-Native enviroments, issue 125, also mentioned on #14. The problem is that repo is not maintained anymore. So we're orphans here.

Probably a lesser known project like fetch-everywhere would do the trick or you can roll out your own!

@schickling
Copy link
Contributor Author

Thanks a lot. This is great input!

@mysport12
Copy link

First off, thank you for this package. It has helped me out tremendously. As for this discussion, I have been having success using fetch-everywhere.

@lquixada
Copy link
Contributor

lquixada commented Oct 4, 2017

We have issues with a lot of fetch alternatives in the community. For instance, isomorphic-fetch has this bug, is no longer maintained and is outdated. fetch-everywhere is in the same situation but with the bug fixed. In both of them polyfill is mandatory. This can be an issue sometimes.

That's why I created cross-fetch. We have this project for a huge e-commerce company here that the same javascript codebase needed to run on several platforms (react-native included). No lib felt right for this job. But now we use cross-fetch: it's fixed, updated and cross-platform.

@schickling
Copy link
Contributor Author

schickling commented Oct 4, 2017

Thanks a lot for your comment @lquixada. I'm excited to see your project and hope it stays well-maintained and up-to-date (I know how hard this can be!)

Also, thanks a lot for the PR. Looking forward to see whether this also fixes #18. 💪

@lquixada
Copy link
Contributor

lquixada commented Oct 4, 2017

Thanks for accepting my PR! I'm so excited! I'll finally be able to move my graphql migration foward! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants