From c5ce53a3ccd0d806b3f6bf43ba4b2838d20e0824 Mon Sep 17 00:00:00 2001 From: benitav Date: Mon, 28 Jul 2025 17:26:35 +0200 Subject: [PATCH 01/12] init --- .../react-native-and-expo/expo-go-support.mdx | 30 +++++++ snippets/react-native/installation.mdx | 79 ++++++++++++++++--- 2 files changed, 99 insertions(+), 10 deletions(-) create mode 100644 client-sdk-references/react-native-and-expo/expo-go-support.mdx diff --git a/client-sdk-references/react-native-and-expo/expo-go-support.mdx b/client-sdk-references/react-native-and-expo/expo-go-support.mdx new file mode 100644 index 00000000..a2b0e2d9 --- /dev/null +++ b/client-sdk-references/react-native-and-expo/expo-go-support.mdx @@ -0,0 +1,30 @@ +--- +title: "Expo Go Support" +description: "Support for Expo Go using @powersync/dev" +--- + +Expo Go allows you to quickly spin up a sandbox of your application without having to make a development build. + +# @powersync/dev Package + +The @powersync/dev package provides a pure JavaScript SQLite implementation using SQL.js, allowing PowerSync to work in Expo Go without native dependencies. It uses our custom fork [powersync-sql-js](https://github.com/powersync-ja/powersync-sql-js). + +Note: This package is in alpha. + + +**Development Use Only** + +This package will be much slower than DB adapters that use native dependencies, so we only recommend it for development. In production, switch to RNQS or OP-SQLite (see details below). + + +## Usage + +todo + +## Going to Production + +The @powersync/dev package is specifically designed to streamline the development workflow and will be much slower than DB adapters that use native dependencies. + +For production builds we recommend switching to our [react-native-quick-sqlite](https://www.npmjs.com/package/@journeyapps/react-native-quick-sqlite) or [OP-SQLite](https://www.npmjs.com/package/@powersync/op-sqlite) adapters as they give substantially better performance. + + diff --git a/snippets/react-native/installation.mdx b/snippets/react-native/installation.mdx index 9cf3333d..6628f692 100644 --- a/snippets/react-native/installation.mdx +++ b/snippets/react-native/installation.mdx @@ -1,8 +1,3 @@ - - **PowerSync is not compatible with Expo Go.** - PowerSync uses a native plugin and is therefore only compatible with Expo Dev Builds. - - Add the [PowerSync React Native NPM package](https://www.npmjs.com/package/@powersync/react-native) to your project: @@ -25,9 +20,75 @@ Add the [PowerSync React Native NPM package](https://www.npmjs.com/package/@powe -**Required peer dependencies** - -This SDK requires [@journeyapps/react-native-quick-sqlite](https://www.npmjs.com/package/@journeyapps/react-native-quick-sqlite) as a peer dependency. Install it as follows: +### Database Adapter Installation + +PowerSync requires a SQLite database adapter. Choose based on your development and deployment needs: + +#### For Development and Testing with Expo Go + +Install the [@powersync/dev package](https://www.npmjs.com/package/@powersync/dev) for Expo Go compatibility: + + + + ```bash + npx expo install @powersync/dev + ``` + + + + ```bash + yarn expo add @powersync/dev + ``` + + + + ``` + pnpm expo install @powersync/dev + ``` + + + +See the [Expo Go Support documentation](/client-sdk-references/react-native-and-expo/expo-go-support) for additional setup details. + + +**Development Use Only** + +The @powersync/dev package is designed for development and testing purposes only. It will perform much slower than native database adapters. + + +#### For Production Use Cases + +Choose between these native database adapters: + +**OP-SQLite (Recommended)** + +The [PowerSync OP-SQLite package](https://www.npmjs.com/package/@powersync/op-sqlite) offers: +- Built-in encryption support via SQLCipher +- Smoother transition to React Native's New Architecture + + + + ```bash + npx expo install @powersync/op-sqlite @op-engineering/op-sqlite + ``` + + + + ```bash + yarn expo add @powersync/op-sqlite @op-engineering/op-sqlite + ``` + + + + ``` + pnpm expo install @powersync/op-sqlite @op-engineering/op-sqlite + ``` + + + +**React Native Quick SQLite** + +The [@journeyapps/react-native-quick-sqlite](https://www.npmjs.com/package/@journeyapps/react-native-quick-sqlite) package is the original database adapter for React Native and therefore more battle-tested in production environments. @@ -49,8 +110,6 @@ This SDK requires [@journeyapps/react-native-quick-sqlite](https://www.npmjs.com -Alternatively, you can install OP-SQLite with the [PowerSync OP-SQLite package](https://github.com/powersync-ja/powersync-js/tree/main/packages/powersync-op-sqlite) which offers [built-in encryption support via SQLCipher](/usage/use-case-examples/data-encryption) and a smoother transition to React Native's New Architecture. - **Polyfills and additional notes:** From 05019881ba1dcce593e04f92076f115e900e99a7 Mon Sep 17 00:00:00 2001 From: benitav Date: Mon, 28 Jul 2025 17:29:09 +0200 Subject: [PATCH 02/12] add link to docs.json --- .../react-native-and-expo/expo-go-support.mdx | 4 ++-- docs.json | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client-sdk-references/react-native-and-expo/expo-go-support.mdx b/client-sdk-references/react-native-and-expo/expo-go-support.mdx index a2b0e2d9..5e67c468 100644 --- a/client-sdk-references/react-native-and-expo/expo-go-support.mdx +++ b/client-sdk-references/react-native-and-expo/expo-go-support.mdx @@ -19,7 +19,7 @@ This package will be much slower than DB adapters that use native dependencies, ## Usage -todo +todo: how to install and use ## Going to Production @@ -27,4 +27,4 @@ The @powersync/dev package is specifically designed to streamline the developmen For production builds we recommend switching to our [react-native-quick-sqlite](https://www.npmjs.com/package/@journeyapps/react-native-quick-sqlite) or [OP-SQLite](https://www.npmjs.com/package/@powersync/op-sqlite) adapters as they give substantially better performance. - +todo: details on how to switch \ No newline at end of file diff --git a/docs.json b/docs.json index 9f110723..bb5797dd 100644 --- a/docs.json +++ b/docs.json @@ -277,6 +277,7 @@ "icon": "react", "pages": [ "client-sdk-references/react-native-and-expo", + "client-sdk-references/react-native-and-expo/expo-go-support", "client-sdk-references/react-native-and-expo/react-native-web-support", "client-sdk-references/react-native-and-expo/javascript-orm-support", "client-sdk-references/react-native-and-expo/usage-examples", From d452bcdeb8035afa13c4b590ebca55df966cd796 Mon Sep 17 00:00:00 2001 From: Christiaan Landman Date: Tue, 29 Jul 2025 10:43:54 +0200 Subject: [PATCH 03/12] Added snippets for usage. --- .../react-native-and-expo/expo-go-support.mdx | 43 +++++++++++++++++-- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/client-sdk-references/react-native-and-expo/expo-go-support.mdx b/client-sdk-references/react-native-and-expo/expo-go-support.mdx index 5e67c468..1473570b 100644 --- a/client-sdk-references/react-native-and-expo/expo-go-support.mdx +++ b/client-sdk-references/react-native-and-expo/expo-go-support.mdx @@ -15,16 +15,53 @@ Note: This package is in alpha. **Development Use Only** This package will be much slower than DB adapters that use native dependencies, so we only recommend it for development. In production, switch to RNQS or OP-SQLite (see details below). + ## Usage -todo: how to install and use +```bash +npm install @powersync/dev +``` + +```js SystemProvider.tsx +import { SQLJSOpenFactory } from "@powersync/dev"; +import { PowerSyncDatabase } from "@powersync/react-native"; + +export const powerSync = new PowerSyncDatabase({ + schema: AppSchema, + database: new SQLJSOpenFactory({ + dbFilename: "example.db", + }), +}); +``` + +The default version of this adapter uses in-memory persistence, but you can specify your own `persister` option to the open factory. +Link to readme for our Expo/React example. + +If you need to keep using Expo Go alongside development and production builds, you can switch between different adapters based on the Expo `executionEnvironment`. + +```js SystemProvider.tsx +import { SQLJSOpenFactory } from "@powersync/dev"; +import { PowerSyncDatabase } from "@powersync/react-native"; +import Constants from "expo-constants"; + +const isExpoGo = Constants.executionEnvironment === "storeClient"; + +export const powerSync = new PowerSyncDatabase({ + schema: AppSchema, + database: isExpoGo + ? new SQLJSOpenFactory({ + dbFilename: "app.db", + }) + : { + dbFilename: "sqlite.db", + }, +}); +``` ## Going to Production The @powersync/dev package is specifically designed to streamline the development workflow and will be much slower than DB adapters that use native dependencies. For production builds we recommend switching to our [react-native-quick-sqlite](https://www.npmjs.com/package/@journeyapps/react-native-quick-sqlite) or [OP-SQLite](https://www.npmjs.com/package/@powersync/op-sqlite) adapters as they give substantially better performance. - -todo: details on how to switch \ No newline at end of file From 33ccc4f2a2fe40fb6e3cf31fd84a68660163d762 Mon Sep 17 00:00:00 2001 From: benitav Date: Wed, 30 Jul 2025 17:57:38 +0200 Subject: [PATCH 04/12] restructure --- .../react-native-and-expo/expo-go-support.mdx | 27 ++++++------ snippets/react-native/installation.mdx | 42 +++---------------- 2 files changed, 17 insertions(+), 52 deletions(-) diff --git a/client-sdk-references/react-native-and-expo/expo-go-support.mdx b/client-sdk-references/react-native-and-expo/expo-go-support.mdx index 1473570b..21c269b8 100644 --- a/client-sdk-references/react-native-and-expo/expo-go-support.mdx +++ b/client-sdk-references/react-native-and-expo/expo-go-support.mdx @@ -1,31 +1,28 @@ --- title: "Expo Go Support" -description: "Support for Expo Go using @powersync/dev" +description: "Support for Expo Go using @powersync/adapter-sql-js" --- -Expo Go allows you to quickly spin up a sandbox of your application without having to make a development build. +Expo Go allows you to quickly spin up a sandbox of your application without having to make a development build. Our native database adapters (OP-SQLite and React Native Quick SQLite) are not compatible with Expo Go since they require native code compilation. -# @powersync/dev Package +# @powersync/adapter-sql-js Package -The @powersync/dev package provides a pure JavaScript SQLite implementation using SQL.js, allowing PowerSync to work in Expo Go without native dependencies. It uses our custom fork [powersync-sql-js](https://github.com/powersync-ja/powersync-sql-js). - -Note: This package is in alpha. +The @powersync/adapter-sql-js package provides a pure JavaScript SQLite implementation using SQL.js, allowing PowerSync to work in Expo Go without native dependencies. It uses our custom fork [powersync-sql-js](https://github.com/powersync-ja/powersync-sql-js). -**Development Use Only** - -This package will be much slower than DB adapters that use native dependencies, so we only recommend it for development. In production, switch to RNQS or OP-SQLite (see details below). - +* This package is in an alpha release. +* **Development Use Only** + This package will be much slower than DB adapters that use native dependencies, so we only recommend it for development. In production, switch to OP-SQLite and React Native Quick SQLite (see details below). ## Usage ```bash -npm install @powersync/dev +npm install @powersync/adapter-sql-js ``` ```js SystemProvider.tsx -import { SQLJSOpenFactory } from "@powersync/dev"; +import { SQLJSOpenFactory } from "@powersync/adapter-sql-js"; import { PowerSyncDatabase } from "@powersync/react-native"; export const powerSync = new PowerSyncDatabase({ @@ -42,7 +39,7 @@ Link to readme for our Expo/React example. If you need to keep using Expo Go alongside development and production builds, you can switch between different adapters based on the Expo `executionEnvironment`. ```js SystemProvider.tsx -import { SQLJSOpenFactory } from "@powersync/dev"; +import { SQLJSOpenFactory } from "@powersync/adapter-sql-js"; import { PowerSyncDatabase } from "@powersync/react-native"; import Constants from "expo-constants"; @@ -62,6 +59,6 @@ export const powerSync = new PowerSyncDatabase({ ## Going to Production -The @powersync/dev package is specifically designed to streamline the development workflow and will be much slower than DB adapters that use native dependencies. +The @powersync/adapter-sql-js package is specifically designed to streamline the development workflow on Expo Go and will be much slower than DB adapters that use native dependencies. -For production builds we recommend switching to our [react-native-quick-sqlite](https://www.npmjs.com/package/@journeyapps/react-native-quick-sqlite) or [OP-SQLite](https://www.npmjs.com/package/@powersync/op-sqlite) adapters as they give substantially better performance. +For production builds we recommend switching to our [react-native-quick-sqlite](https://www.npmjs.com/package/@journeyapps/react-native-quick-sqlite) or [OP-SQLite](https://www.npmjs.com/package/@powersync/op-sqlite) adapters as they give substantially better performance. See [Installation](/client-sdk-references/react-native-and-expo#installation) details. diff --git a/snippets/react-native/installation.mdx b/snippets/react-native/installation.mdx index 6628f692..1a22cbd0 100644 --- a/snippets/react-native/installation.mdx +++ b/snippets/react-native/installation.mdx @@ -20,45 +20,13 @@ Add the [PowerSync React Native NPM package](https://www.npmjs.com/package/@powe -### Database Adapter Installation +### Install peer dependencies -PowerSync requires a SQLite database adapter. Choose based on your development and deployment needs: +PowerSync requires a SQLite database adapter. Choose between: -#### For Development and Testing with Expo Go - -Install the [@powersync/dev package](https://www.npmjs.com/package/@powersync/dev) for Expo Go compatibility: - - - - ```bash - npx expo install @powersync/dev - ``` - - - - ```bash - yarn expo add @powersync/dev - ``` - - - - ``` - pnpm expo install @powersync/dev - ``` - - - -See the [Expo Go Support documentation](/client-sdk-references/react-native-and-expo/expo-go-support) for additional setup details. - - -**Development Use Only** - -The @powersync/dev package is designed for development and testing purposes only. It will perform much slower than native database adapters. - - -#### For Production Use Cases - -Choose between these native database adapters: + +**Expo Go user?** Our native database adapters (OP-SQLite and React Native Quick SQLite) are not compatible with Expo Go since they require native code compilation. Get up and running quickly by installing our JavaScript-based DB adapter `@powersync/adapter-sql-js` instead. See details [here](/client-sdk-references/react-native-and-expo/expo-go-support). + **OP-SQLite (Recommended)** From 432ed2d316ace15f2cec2be54c0afcfb5fe207ef Mon Sep 17 00:00:00 2001 From: benitav Date: Wed, 30 Jul 2025 17:59:24 +0200 Subject: [PATCH 05/12] Links --- .../react-native-and-expo/expo-go-support.mdx | 2 +- snippets/react-native/installation.mdx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client-sdk-references/react-native-and-expo/expo-go-support.mdx b/client-sdk-references/react-native-and-expo/expo-go-support.mdx index 21c269b8..42ab4b90 100644 --- a/client-sdk-references/react-native-and-expo/expo-go-support.mdx +++ b/client-sdk-references/react-native-and-expo/expo-go-support.mdx @@ -61,4 +61,4 @@ export const powerSync = new PowerSyncDatabase({ The @powersync/adapter-sql-js package is specifically designed to streamline the development workflow on Expo Go and will be much slower than DB adapters that use native dependencies. -For production builds we recommend switching to our [react-native-quick-sqlite](https://www.npmjs.com/package/@journeyapps/react-native-quick-sqlite) or [OP-SQLite](https://www.npmjs.com/package/@powersync/op-sqlite) adapters as they give substantially better performance. See [Installation](/client-sdk-references/react-native-and-expo#installation) details. +For production builds we recommend switching to our [react-native-quick-sqlite](https://www.npmjs.com/package/@journeyapps/react-native-quick-sqlite) or [OP-SQLite](https://www.npmjs.com/package/@powersync/op-sqlite) adapters as they give substantially better performance. See [Installation](/client-sdk-references/react-native-and-expo#install-peer-dependencies) details. diff --git a/snippets/react-native/installation.mdx b/snippets/react-native/installation.mdx index 1a22cbd0..991481af 100644 --- a/snippets/react-native/installation.mdx +++ b/snippets/react-native/installation.mdx @@ -22,15 +22,17 @@ Add the [PowerSync React Native NPM package](https://www.npmjs.com/package/@powe ### Install peer dependencies -PowerSync requires a SQLite database adapter. Choose between: +PowerSync requires a SQLite database adapter. **Expo Go user?** Our native database adapters (OP-SQLite and React Native Quick SQLite) are not compatible with Expo Go since they require native code compilation. Get up and running quickly by installing our JavaScript-based DB adapter `@powersync/adapter-sql-js` instead. See details [here](/client-sdk-references/react-native-and-expo/expo-go-support). +Choose between: + **OP-SQLite (Recommended)** -The [PowerSync OP-SQLite package](https://www.npmjs.com/package/@powersync/op-sqlite) offers: +[PowerSync OP-SQLite](https://www.npmjs.com/package/@powersync/op-sqlite) offers: - Built-in encryption support via SQLCipher - Smoother transition to React Native's New Architecture From 1a754d027714a1a62d830f2f073521f3f2c559af Mon Sep 17 00:00:00 2001 From: benitav Date: Thu, 31 Jul 2025 11:09:33 +0200 Subject: [PATCH 06/12] Polish --- .../react-native-and-expo/expo-go-support.mdx | 37 ++++++++++++------- snippets/react-native/installation.mdx | 2 +- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/client-sdk-references/react-native-and-expo/expo-go-support.mdx b/client-sdk-references/react-native-and-expo/expo-go-support.mdx index 42ab4b90..3d9174f2 100644 --- a/client-sdk-references/react-native-and-expo/expo-go-support.mdx +++ b/client-sdk-references/react-native-and-expo/expo-go-support.mdx @@ -3,16 +3,18 @@ title: "Expo Go Support" description: "Support for Expo Go using @powersync/adapter-sql-js" --- -Expo Go allows you to quickly spin up a sandbox of your application without having to make a development build. Our native database adapters (OP-SQLite and React Native Quick SQLite) are not compatible with Expo Go since they require native code compilation. +Expo Go is a sandbox environment that allows you to quickly test and develop your application without building a development build. Our native SQLite database adapters for React Native apps (OP-SQLite and React Native Quick SQLite) cannot run in Expo Go because they require native code compilation - specifically, PowerSync needs a SQLite implementation that can load our [Rust core extension](https://github.com/powersync-ja/powersync-sqlite-core), which isn't possible in Expo Go's prebuilt app container. To enable PowerSync in Expo Go, we provide a JavaScript-based database adapter: [`@powersync/adapter-sql-js`](https://www.npmjs.com/package/@powersync/adapter-sql-js). -# @powersync/adapter-sql-js Package +# @powersync/adapter-sql-js database adapter -The @powersync/adapter-sql-js package provides a pure JavaScript SQLite implementation using SQL.js, allowing PowerSync to work in Expo Go without native dependencies. It uses our custom fork [powersync-sql-js](https://github.com/powersync-ja/powersync-sql-js). +A development package for PowerSync which uses SQL.js to provide a pure JavaScript SQLite implementation. This eliminates the need for native dependencies and enables development with Expo Go and other JavaScript-only environments. Both SQLite and PowerSync's Rust core extension are compiled to JavaScript using Emscripten. Under the hood, it uses our custom fork [powersync-sql-js](https://github.com/powersync-ja/powersync-sql-js). * This package is in an alpha release. -* **Development Use Only** - This package will be much slower than DB adapters that use native dependencies, so we only recommend it for development. In production, switch to OP-SQLite and React Native Quick SQLite (see details below). +* **Expo Go Sandbox Environment Only** + +This adapter is specifically designed for Expo Go and similar JavaScript-only environments. It will be much slower than native database adapters and has limitations. Every write operation triggers a complete rewrite of the entire database file to persistent storage, not just the changed data. In addition to the performance overheads, this adapter doesn't provide any of the SQLite consistency guarantees - you may end up with missing data or a corrupted database file if the app is killed while writing to the database file. + ## Usage @@ -33,10 +35,23 @@ export const powerSync = new PowerSyncDatabase({ }); ``` +### Data Persistence + The default version of this adapter uses in-memory persistence, but you can specify your own `persister` option to the open factory. -Link to readme for our Expo/React example. +See an example in the package [README](https://www.npmjs.com/package/@powersync/adapter-sql-js). + +## Moving Beyond Expo Go + +When you're ready to move beyond the Expo Go sandbox environment - whether for native development builds or production deployment - we recommend switching to our native database adapters: + +- [OP-SQLite](https://www.npmjs.com/package/@powersync/op-sqlite) (Recommended) - Offers built-in encryption support and better React Native New Architecture compatibility +- [React Native Quick SQLite](https://www.npmjs.com/package/@journeyapps/react-native-quick-sqlite) - Our original native adapter -If you need to keep using Expo Go alongside development and production builds, you can switch between different adapters based on the Expo `executionEnvironment`. +These adapters provide better performance, full SQLite consistency guarantees, and are suitable for both development builds and production deployment. See the SDKs [Installation](/client-sdk-references/react-native-and-expo#install-peer-dependencies) details for setup instructions. + +### Switching Between Adapters - Example + +If you want to keep using Expo Go alongside development and production builds, you can switch between different adapters based on the Expo `executionEnvironment`: ```js SystemProvider.tsx import { SQLJSOpenFactory } from "@powersync/adapter-sql-js"; @@ -55,10 +70,4 @@ export const powerSync = new PowerSyncDatabase({ dbFilename: "sqlite.db", }, }); -``` - -## Going to Production - -The @powersync/adapter-sql-js package is specifically designed to streamline the development workflow on Expo Go and will be much slower than DB adapters that use native dependencies. - -For production builds we recommend switching to our [react-native-quick-sqlite](https://www.npmjs.com/package/@journeyapps/react-native-quick-sqlite) or [OP-SQLite](https://www.npmjs.com/package/@powersync/op-sqlite) adapters as they give substantially better performance. See [Installation](/client-sdk-references/react-native-and-expo#install-peer-dependencies) details. +``` \ No newline at end of file diff --git a/snippets/react-native/installation.mdx b/snippets/react-native/installation.mdx index 991481af..3f9e3908 100644 --- a/snippets/react-native/installation.mdx +++ b/snippets/react-native/installation.mdx @@ -25,7 +25,7 @@ Add the [PowerSync React Native NPM package](https://www.npmjs.com/package/@powe PowerSync requires a SQLite database adapter. -**Expo Go user?** Our native database adapters (OP-SQLite and React Native Quick SQLite) are not compatible with Expo Go since they require native code compilation. Get up and running quickly by installing our JavaScript-based DB adapter `@powersync/adapter-sql-js` instead. See details [here](/client-sdk-references/react-native-and-expo/expo-go-support). +**Using Expo Go?** Our native database adapters (OP-SQLite and React Native Quick SQLite) are not compatible with Expo Go's sandbox environment since they require native code compilation - specifically, PowerSync needs a SQLite implementation that can load our Rust core extension, which isn't possible in Expo Go's prebuilt app container. Get up and running quickly by installing our JavaScript-based adapter `@powersync/adapter-sql-js` instead. Note that this adapter is much slower and doesn't provide SQLite consistency guarantees - it's designed specifically for the Expo Go sandbox. When you're ready for native development builds or production, switch to our native adapters. See details [here](/client-sdk-references/react-native-and-expo/expo-go-support). Choose between: From 69443d314a769ea1dc3dc2c0b86568cddde9d4cd Mon Sep 17 00:00:00 2001 From: benitav Date: Thu, 31 Jul 2025 11:11:25 +0200 Subject: [PATCH 07/12] Simpler tip --- snippets/react-native/installation.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/react-native/installation.mdx b/snippets/react-native/installation.mdx index 3f9e3908..739e9b21 100644 --- a/snippets/react-native/installation.mdx +++ b/snippets/react-native/installation.mdx @@ -25,7 +25,7 @@ Add the [PowerSync React Native NPM package](https://www.npmjs.com/package/@powe PowerSync requires a SQLite database adapter. -**Using Expo Go?** Our native database adapters (OP-SQLite and React Native Quick SQLite) are not compatible with Expo Go's sandbox environment since they require native code compilation - specifically, PowerSync needs a SQLite implementation that can load our Rust core extension, which isn't possible in Expo Go's prebuilt app container. Get up and running quickly by installing our JavaScript-based adapter `@powersync/adapter-sql-js` instead. Note that this adapter is much slower and doesn't provide SQLite consistency guarantees - it's designed specifically for the Expo Go sandbox. When you're ready for native development builds or production, switch to our native adapters. See details [here](/client-sdk-references/react-native-and-expo/expo-go-support). +**Using Expo Go?** Our native database adapters (OP-SQLite and React Native Quick SQLite) are not compatible with Expo Go's sandbox environment. To run PowerSync with Expo Go install our JavaScript-based adapter `@powersync/adapter-sql-js` instead. See details [here](/client-sdk-references/react-native-and-expo/expo-go-support). Choose between: From 4f88c8f5c3a24e4afd402e8e3f913e5200570ae5 Mon Sep 17 00:00:00 2001 From: benitav Date: Thu, 31 Jul 2025 11:11:50 +0200 Subject: [PATCH 08/12] wording --- snippets/react-native/installation.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/react-native/installation.mdx b/snippets/react-native/installation.mdx index 739e9b21..59d0c6a1 100644 --- a/snippets/react-native/installation.mdx +++ b/snippets/react-native/installation.mdx @@ -25,7 +25,7 @@ Add the [PowerSync React Native NPM package](https://www.npmjs.com/package/@powe PowerSync requires a SQLite database adapter. -**Using Expo Go?** Our native database adapters (OP-SQLite and React Native Quick SQLite) are not compatible with Expo Go's sandbox environment. To run PowerSync with Expo Go install our JavaScript-based adapter `@powersync/adapter-sql-js` instead. See details [here](/client-sdk-references/react-native-and-expo/expo-go-support). +**Using Expo Go?** Our native database adapters listed below (OP-SQLite and React Native Quick SQLite) are not compatible with Expo Go's sandbox environment. To run PowerSync with Expo Go install our JavaScript-based adapter `@powersync/adapter-sql-js` instead. See details [here](/client-sdk-references/react-native-and-expo/expo-go-support). Choose between: From 7374a6d21a33d27b82b21a65bc6170348b00c9ec Mon Sep 17 00:00:00 2001 From: benitav Date: Thu, 31 Jul 2025 11:15:16 +0200 Subject: [PATCH 09/12] polish --- .../react-native-and-expo/expo-go-support.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client-sdk-references/react-native-and-expo/expo-go-support.mdx b/client-sdk-references/react-native-and-expo/expo-go-support.mdx index 3d9174f2..fb2cf56b 100644 --- a/client-sdk-references/react-native-and-expo/expo-go-support.mdx +++ b/client-sdk-references/react-native-and-expo/expo-go-support.mdx @@ -3,17 +3,17 @@ title: "Expo Go Support" description: "Support for Expo Go using @powersync/adapter-sql-js" --- -Expo Go is a sandbox environment that allows you to quickly test and develop your application without building a development build. Our native SQLite database adapters for React Native apps (OP-SQLite and React Native Quick SQLite) cannot run in Expo Go because they require native code compilation - specifically, PowerSync needs a SQLite implementation that can load our [Rust core extension](https://github.com/powersync-ja/powersync-sqlite-core), which isn't possible in Expo Go's prebuilt app container. To enable PowerSync in Expo Go, we provide a JavaScript-based database adapter: [`@powersync/adapter-sql-js`](https://www.npmjs.com/package/@powersync/adapter-sql-js). +Expo Go is a sandbox environment that allows you to quickly test your application without building a development build. Our native SQLite database adapters for React Native apps (OP-SQLite and React Native Quick SQLite) cannot run in Expo Go because they require native code compilation. Specifically, PowerSync needs a SQLite implementation that can load our [Rust core extension](https://github.com/powersync-ja/powersync-sqlite-core), which isn't possible in Expo Go's prebuilt app container. To enable PowerSync in Expo Go, we provide a JavaScript-based database adapter: [`@powersync/adapter-sql-js`](https://www.npmjs.com/package/@powersync/adapter-sql-js). -# @powersync/adapter-sql-js database adapter +# @powersync/adapter-sql-js A development package for PowerSync which uses SQL.js to provide a pure JavaScript SQLite implementation. This eliminates the need for native dependencies and enables development with Expo Go and other JavaScript-only environments. Both SQLite and PowerSync's Rust core extension are compiled to JavaScript using Emscripten. Under the hood, it uses our custom fork [powersync-sql-js](https://github.com/powersync-ja/powersync-sql-js). -* This package is in an alpha release. -* **Expo Go Sandbox Environment Only** -This adapter is specifically designed for Expo Go and similar JavaScript-only environments. It will be much slower than native database adapters and has limitations. Every write operation triggers a complete rewrite of the entire database file to persistent storage, not just the changed data. In addition to the performance overheads, this adapter doesn't provide any of the SQLite consistency guarantees - you may end up with missing data or a corrupted database file if the app is killed while writing to the database file. +This package is in an **alpha** release. + +**Expo Go Sandbox Environment Only** This adapter is specifically designed for Expo Go and similar JavaScript-only environments. It will be much slower than native database adapters and has limitations. Every write operation triggers a complete rewrite of the entire database file to persistent storage, not just the changed data. In addition to the performance overheads, this adapter doesn't provide any of the SQLite consistency guarantees - you may end up with missing data or a corrupted database file if the app is killed while writing to the database file. From a73bb4b00f2c623f183b9446246904af5bba5b68 Mon Sep 17 00:00:00 2001 From: benitav Date: Thu, 31 Jul 2025 12:08:09 +0200 Subject: [PATCH 10/12] wording --- client-sdk-references/react-native-and-expo/expo-go-support.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client-sdk-references/react-native-and-expo/expo-go-support.mdx b/client-sdk-references/react-native-and-expo/expo-go-support.mdx index fb2cf56b..eab2c66a 100644 --- a/client-sdk-references/react-native-and-expo/expo-go-support.mdx +++ b/client-sdk-references/react-native-and-expo/expo-go-support.mdx @@ -7,7 +7,7 @@ Expo Go is a sandbox environment that allows you to quickly test your applicatio # @powersync/adapter-sql-js -A development package for PowerSync which uses SQL.js to provide a pure JavaScript SQLite implementation. This eliminates the need for native dependencies and enables development with Expo Go and other JavaScript-only environments. Both SQLite and PowerSync's Rust core extension are compiled to JavaScript using Emscripten. Under the hood, it uses our custom fork [powersync-sql-js](https://github.com/powersync-ja/powersync-sql-js). +A development package for PowerSync which uses SQL.js to provide a pure JavaScript SQLite implementation. This eliminates the need for native dependencies and enables development with Expo Go and other JavaScript-only environments. Under the hood, it uses our custom fork [powersync-sql-js](https://github.com/powersync-ja/powersync-sql-js) - a fork of SQL.js (SQLite compiled to JavaScript via Emscripten) that loads the PowerSync's Rust core extension. From 688c77d12c769762e443a830958a1d97d2c81a88 Mon Sep 17 00:00:00 2001 From: benitav Date: Thu, 31 Jul 2025 13:55:38 +0200 Subject: [PATCH 11/12] rust sync client note --- client-sdk-references/react-native-and-expo/expo-go-support.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client-sdk-references/react-native-and-expo/expo-go-support.mdx b/client-sdk-references/react-native-and-expo/expo-go-support.mdx index eab2c66a..3ff9e1ba 100644 --- a/client-sdk-references/react-native-and-expo/expo-go-support.mdx +++ b/client-sdk-references/react-native-and-expo/expo-go-support.mdx @@ -11,7 +11,7 @@ A development package for PowerSync which uses SQL.js to provide a pure JavaScri -This package is in an **alpha** release. +This package is in an **alpha** release. It also currently does not support the new [Rust-based Sync Client](https://releases.powersync.com/announcements/improved-sync-performance-in-our-client-sdks), but we are working towards supporting it. **Expo Go Sandbox Environment Only** This adapter is specifically designed for Expo Go and similar JavaScript-only environments. It will be much slower than native database adapters and has limitations. Every write operation triggers a complete rewrite of the entire database file to persistent storage, not just the changed data. In addition to the performance overheads, this adapter doesn't provide any of the SQLite consistency guarantees - you may end up with missing data or a corrupted database file if the app is killed while writing to the database file. From 9763769aca458a8674b5e61eb8a073102d23e621 Mon Sep 17 00:00:00 2001 From: benitav Date: Mon, 4 Aug 2025 08:49:56 +0200 Subject: [PATCH 12/12] Remove rust sync client note again --- client-sdk-references/react-native-and-expo/expo-go-support.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client-sdk-references/react-native-and-expo/expo-go-support.mdx b/client-sdk-references/react-native-and-expo/expo-go-support.mdx index 3ff9e1ba..09081987 100644 --- a/client-sdk-references/react-native-and-expo/expo-go-support.mdx +++ b/client-sdk-references/react-native-and-expo/expo-go-support.mdx @@ -11,7 +11,7 @@ A development package for PowerSync which uses SQL.js to provide a pure JavaScri -This package is in an **alpha** release. It also currently does not support the new [Rust-based Sync Client](https://releases.powersync.com/announcements/improved-sync-performance-in-our-client-sdks), but we are working towards supporting it. +This package is in an **alpha** release. **Expo Go Sandbox Environment Only** This adapter is specifically designed for Expo Go and similar JavaScript-only environments. It will be much slower than native database adapters and has limitations. Every write operation triggers a complete rewrite of the entire database file to persistent storage, not just the changed data. In addition to the performance overheads, this adapter doesn't provide any of the SQLite consistency guarantees - you may end up with missing data or a corrupted database file if the app is killed while writing to the database file.