@powersync/react-native 0.0.0-dev-20240718080705 → 0.0.0-dev-20240719091128

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +2 -35
  2. package/dist/index.js +243 -1255
  3. package/package.json +5 -5
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  _[PowerSync](https://www.powersync.com) is a Postgres-SQLite sync layer, which helps developers to create local-first real-time reactive apps that work seamlessly both online and offline._
8
8
 
9
- This package (`packages/react-native`) is the PowerSync SDK for React Native clients. It is an extension of `packages/common`.
9
+ This package (`packages/react-native`) is the PowerSync SDK for React Native clients. It is an extension of `packages/common`. It connects to a PowerSync instance via HTTP streams (enabled by default) or WebSockets.
10
10
 
11
11
  See a summary of features [here](https://docs.powersync.co/client-sdk-references/react-native-and-expo).
12
12
 
@@ -30,40 +30,7 @@ npx expo install @journeyapps/react-native-quick-sqlite
30
30
 
31
31
  ## Install Polyfills
32
32
 
33
- This package connects to a PowerSync instance via HTTP streams (enabled by default) or WebSockets.
34
-
35
- - Both connection methods require the [React Native Common Polyfills](#react-native-common-polyfills), as detailed below.
36
- - The WebSocket method requires an [additional polyfill](#web-sockets-buffer) for the `Buffer` interface.
37
- - Other polyfills are required for [watched queries](#babel-plugins-watched-queries) using the Async Iterator response format.
38
-
39
- ### React Native Common Polyfills
40
-
41
- This package requires polyfills for HTTP streaming and other text encoding functions. These functions can be provided with [react-native-polyfill-globals](https://www.npmjs.com/package/react-native-polyfill-globals).
42
-
43
- Install the collection of polyfills with:
44
-
45
- ```bash
46
- npx expo install react-native-polyfill-globals
47
- ```
48
-
49
- The `react-native-polyfill-globals` package uses peer dependencies for individual functions. Most modern package managers install peer dependencies by default, however currently the peer dependency version ranges are quite broad and might result in certain packages being incompatible. Currently an [issue](https://github.com/acostalima/react-native-polyfill-globals/issues/6) is open for a breaking change in one of the dependencies. The best practice is to currently add the packages as explicit dependencies with version ranges to your project with the command below.
50
-
51
- ```bash
52
- npx expo install react-native-fetch-api@^3.0.0 react-native-url-polyfill@^2.0.0 text-encoding@^0.7.0 web-streams-polyfill@3.2.1 base-64@^1.0.0
53
- ```
54
-
55
- Enable the polyfills in React Native app by adding the following in your top level entry point
56
-
57
- ```JavaScript
58
- // App.js
59
- import 'react-native-polyfill-globals/auto';
60
- ```
61
-
62
- ### HTTP Connections
63
-
64
- HTTP connections require the HTTP streaming polyfills included in the [common section](#react-native-common-polyfills). See additional [setup](https://docs.powersync.com/client-sdk-references/react-native-and-expo#android-flipper-network-plugin) required for Android.
65
-
66
- This library uses `RSocket` for reactive WebSocket streams which requires `process.nextTick` to be available. Apply a polyfill if not available.
33
+ - Polyfills are required for [watched queries](#babel-plugins-watched-queries) using the Async Iterator response format.
67
34
 
68
35
  ### Babel Plugins: Watched Queries
69
36