react / react/react-native

fetch implementation does not support streams from the spec - needs implementation in React Native core

Open
#27,741 42 comments 73 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🌐Networking Bug
Dominant language
C++
Stars
127k
Forks
25.3k
Avg merge
1d 23h
Merged PRs (30d)
4

Description

React Native has not implemented fetch on top of native APIs, and the fetch polyfill built on top of XHR does not support streams where response.body is a getter for a ReadableStream.

React Native version:

0.61.4

Steps To Reproduce

Use fetch and see that response.body is undefined rather than a getter for a ReadableStream according the the fetch spec.

Describe what you expected to happen:

I expected for response.body to be defined.

Related issues

https://github.com/facebook/react-native/issues/9629
https://github.com/facebook/react-native/issues/12912
https://github.com/github/fetch/issues/746#issuecomment-573251497 (cc @MattiasBuelens)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the fetch polyfill and its XHR-based response handling, then compare response.body with the Fetch specification and related issues #9629 and #12912. Done means fetch responses expose response.body as a ReadableStream, with coverage for the reported behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native
Domain
mobile
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.