You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@cpojer I'm reaching out to follow up on a previous discussion about coming up with a custom Fetch API implementation for React Native at https://github.com/react-native-community/fetch with support for streaming (react/react-native#27741). We, MOXY and Protocol Labs, are planning to start this effort shortly and we'd like to know your thoughts on the matter.
In short, what we currently have in mind is as follows:
Assume ReadableStream is available in RN's environment which can be polyfilled with web-streams-polyfill. If ReadableStream is expected to only be used in the context of Fetch, we can probably bundle them together.
Have tests in place running in an actual RN app on GitHub's CI.
Even if Facebook has no plans to add support for streaming to Fetch for the time being, app developers can easily swap out whatwg-fetch for @react-native-community/fetch manually. Even better would be React Native to do this automatically via some sort of extension or plugin API.
Are there any guidelines which React Native Community packages should conform to? e.g. linter and linting config, CI process config, etc.
@tex0l Thanks! I wasn't aware rn-fetch-blob had a drop-in fetch replacement. That project looks interesting although its complexity is much superior than what we're trying to achieve here considering its has a strong native component. In our case, we're still going to be limited to text streaming as RN's networking layer cannot stream binary.
Paging @Titozzz re moving packages out of the RNC namespace. What's the goal wrt new packages, can they still publish under the org name or should they publish to their own namespace?
@acostalima Did you manage to the the time to fix the Android issue? As I understand it your solution does not work on android devices currently. Thank you for the hard work you put into making it.
I feel like the React team should be supporting this. It is rather important and it seems like a lot of libraries have had to work around this often by having to drop to native code which is extremely painful because it means that rather than allowing users to use already published and maintained libraries they need to make special one off ones for React Native.
Regardless of what is popular for features this seems like a rather important problem to the platform at a fundamental level. It should be worked on so we don't need to duplicate libraries that do a bit more than simple HTTP requests.
I haven't touched the React Native ecosystem for a few years now and I don't have the bandwidth to maintain this project anymore. Several (critical) issues have been opened in the meantime.
I've noticed the Expo team has released expo/fetch module which is WHATWG Fetch API-compliant and has streaming support. Therefore, I wonder about the future of this project and whether it make sense to sunset it in favor of the Expo module? Could it make sense to make the sole goal of this project to become, at some point, a drop in replacement for React Native's Fetch API and a thin layer that adds minimal streaming support using React Native's core networking APIs?
Is it possible to install expo/fetch in a bare React Native app without bringing expo as whole and not increase the JS and native bundle size significantly as a result, etc.? Is it even a thing nowadays, i.e., starting a brand new app without a framework such as Expo? According to React Native's Getting Started docs, I'm not so sure. 🤔
Activity
hugomrdias commentedon Oct 27, 2020
/cc @autonome
cpojer commentedon Oct 28, 2020
I think this plan sounds good. If your rewrite does not increase bundle size, we can even consider swapping out
whatwg-fetchwith the new version.tex0l commentedon Oct 30, 2020
I'd be very interested in a stable fetch polyfill that handles streams. By the way, I'm currently considering using https://github.com/joltup/rn-fetch-blob#drop-in-fetch-replacement, I'll debrief you of how it works.
[-]Planning[/-][+]Technical planning and discussion[/+]acostalima commentedon Oct 30, 2020
@cpojer Could you please give me permissions to maintain the repo? Thanks!
acostalima commentedon Oct 30, 2020
@tex0l Thanks! I wasn't aware
rn-fetch-blobhad a drop-in fetch replacement. That project looks interesting although its complexity is much superior than what we're trying to achieve here considering its has a strong native component. In our case, we're still going to be limited to text streaming as RN's networking layer cannot stream binary.cpojer commentedon Nov 1, 2020
Done!
acostalima commentedon Jan 14, 2021
@cpojer I'm not being able to publish the package under react-native-community's organization. Can you give me such permission?
acostalima commentedon Jan 20, 2021
Ping @cpojer.
acostalima commentedon Jan 25, 2021
@alloy Can you help? 🙏
alloy commentedon Jan 25, 2021
Paging @Titozzz re moving packages out of the RNC namespace. What's the goal wrt new packages, can they still publish under the org name or should they publish to their own namespace?
Titozzz commentedon Jan 25, 2021
Everyone is moving out of the RNC Scope so yeah it should be published under its own name
acostalima commentedon Jan 25, 2021
@Titozzz got it, thanks! I assume
react-native-fetchor similar is the way to go?acostalima commentedon Jan 25, 2021
Published as
react-native-fetch-api🎉RobertWHurst commentedon Apr 12, 2023
@acostalima Did you manage to the the time to fix the Android issue? As I understand it your solution does not work on android devices currently. Thank you for the hard work you put into making it.
I feel like the React team should be supporting this. It is rather important and it seems like a lot of libraries have had to work around this often by having to drop to native code which is extremely painful because it means that rather than allowing users to use already published and maintained libraries they need to make special one off ones for React Native.
Regardless of what is popular for features this seems like a rather important problem to the platform at a fundamental level. It should be worked on so we don't need to duplicate libraries that do a bit more than simple HTTP requests.
acostalima commentedon Sep 16, 2025
Hi everyone,
I haven't touched the React Native ecosystem for a few years now and I don't have the bandwidth to maintain this project anymore. Several (critical) issues have been opened in the meantime.
I've noticed the Expo team has released
expo/fetchmodule which is WHATWG Fetch API-compliant and has streaming support. Therefore, I wonder about the future of this project and whether it make sense to sunset it in favor of the Expo module? Could it make sense to make the sole goal of this project to become, at some point, a drop in replacement for React Native's Fetch API and a thin layer that adds minimal streaming support using React Native's core networking APIs?Is it possible to install
expo/fetchin a bare React Native app without bringingexpoas whole and not increase the JS and native bundle size significantly as a result, etc.? Is it even a thing nowadays, i.e., starting a brand new app without a framework such as Expo? According to React Native's Getting Started docs, I'm not so sure. 🤔cc @cpojer @Titozzz
cc @brentvatne @EvanBacon @lukmccall and other people from the Expo team you think are worth including in this discussion as well.
Related issues: