Skip to content

feat: initial streams support and convert to I/O module #20

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

Merged
merged 4 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
682 changes: 11 additions & 671 deletions README.md

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions docs/blob.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Blob

## Usage

[TBD]

## Differences with React Native's `Blob`

- Can create `Blob`s from `ArrayBuffer`, `ArrayBufferView` too. With React Native, [you can only create Blob from string or another Blob](https://github.com/facebook/react-native/blob/af384a914a4e9ef6a5d25b00bc14b0483e5af879/packages/react-native/Libraries/Blob/BlobManager.js#L69-L73)
- Each `Blob` has `text()`, `arrayBuffer()`, and `stream()` methods. With React Native, you can only access the contents of `Blob` via [custom `data` field](https://github.com/facebook/react-native/blob/af384a914a4e9ef6a5d25b00bc14b0483e5af879/packages/react-native/Libraries/Blob/Blob.js#L75-L82)
- `Blob` does not depend on a native module. Uses `ArrayBuffer`s natively, thanks to Nitro Modules. With React Native, [Blob uses `RCTBlobManager` under the hood](https://github.com/facebook/react-native/blob/bd323929dc5be5666ee36043babec7d981a095dc/packages/react-native/Libraries/Blob/RCTBlobManager.h#L15) to create and hold references to the data.
- `Blob` is automatically deallocated when no longer in use. [You don't have to `close()` it manually](https://github.com/facebook/react-native/blob/bd323929dc5be5666ee36043babec7d981a095dc/packages/react-native/Libraries/Blob/Blob.js#L122-L138)
13 changes: 13 additions & 0 deletions docs/network.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Networking

## Usage

[TBD]

## Differences with React Native's `fetch`

[TBD]

## Differences with Expo's `fetch`

[TBD]
5 changes: 5 additions & 0 deletions docs/streams.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Streams

## Usage

[TBD]
Loading