Closed jou closed 4 years ago
:+1:
Should probably also support this
as a fallback to self
.
I believe they're planning to fix this in react native itself
@matthew-andrews Could you provide a link to an issue in RN mentioning that? My understanding is that the efficiency of the packager at runtime makes this difficult/impossible.
Thanks @jou !
Thanks for this
👍
👍
What happened to this? I don't see a fix on the RN side (0.32.x) and this is still a present bug.
Hey @matthew-andrews could you please merge it, no matter that that is RN issue ... they aren't going fix it in near future
Small example: https://github.com/facebook/react-native/pull/9942
They just **** up their community, so please don't do the same things, it just save time and brain for all your users. Thank you in advance
I really do not think they will be fixing this in React Native any time soon. Can this just be merged? I am still having this issue
This project had last commit 10 months ago, so basically it's dead project without any active persons here and a lot of PR and issues. Don't waste your time and just switch to any similar project that contains one line fix for react-native, like: https://github.com/lucasfeliciano/fetch-everywhere / https://www.npmjs.com/package/fetch-everywhere
And has an active maintainer.
Another good option is fetch-ponyfill. I added the Node support to it last year. It's actively maintained, and has been around for a few years. It doesn't have the React Native one-liner yet but I imagine @qubyte would be down to include it.
It's a ponyfill which means it's safer / more contained. It loads like a well-behaved CommonJS module, without side effects. It doesn't set or replace window.fetch
.
For those who are interested I forked this project and merged in this PR here: https://github.com/Knotis/portable-fetch. With some minor changes I got this working in my company's react-native app.
Install with NPM via:
npm install portable-fetch
@matthew-andrews please merge this
Please merge... I have switched to @sethdenner 's fork in the meantime. Thank you Seth!!
For all those seeking for an isomorphic-fetch with React Native support alternative, see cross-fetch. It is updated and also brings optional polyfill.
graphql-request and VulcanJS are already using it.
@sethdenner how do I use portable-fetch in my project. I am using react-navigator which in turn uses isomorhic-fetch?
This PR is old enough to speak in full sentences now and still shows up when I check on the statuses of my pull requests at work…
Since the project I needed this for originally has been out of my hands a long time ago and it won't be likely to get any action, I'm closing this.
Specify a separate entry point for React Native that export React Native's
fetch()
polyfill. Would that be a more acceptable fix for #63?