Support for React Native via expo/fetch in @electric-sql/react #3219
ZainNemat
started this conversation in
Feature requests
Replies: 1 comment 2 replies
-
|
We should fix any cases where we don't use the fetchClient. Perhaps we could export a useShapeExpo or something which uses expo/fetch by default. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I’ve been working on integrating ElectricSQL into a React Native app built with Expo, and it got me thinking would it make sense to build a version of the @electric-sql/react hook layer tailored specifically for Expo, using expo/fetch internally instead of the default fetch()?
While exploring the implementation, I noticed a few places where the standard fetch() is used directly, which can lead to issues in Expo environments particularly on Android where native fetch can be slow or unreliable.
I know there’s the fetchClient prop available to customize the fetch logic, which is great but I was wondering if it might make sense to have a dedicated, Expo-friendly hook layer (even as a small wrapper package) that integrates expo/fetch by default in a clean and reliable way.
They have this API in order for consistent behavior across mobile platforms, it has some differences from the standard fetch when used in react native environment.
https://docs.expo.dev/versions/latest/sdk/expo/
Beta Was this translation helpful? Give feedback.
All reactions