TL;DR: If you want to see me perform a spoken word poem about JavaScript in front of 1000 people (and on video), please ⭐ star this gist. If you're on mobile, you'll need to request desktop site.
import Exponent from 'exponent'; | |
import React from 'react'; | |
import { range } from 'lodash'; | |
import { | |
StyleSheet, | |
Dimensions, | |
ScrollView, | |
Animated, | |
Text, |
Blob support landed in React Native in 0.54.
In effect this means you can hold a reference in JS to a resource which exists on the native side, and pass it to a native module without needing a round trip of the serialised data over the bridge and back.
JS side, you can retrieve a blob from fetch like so, which you can then pass to your native module.
const response = await fetch(BLOB_URL);
const blob = await response.blob();
...
blob.clear();