Skip to content

Commit

Permalink
Add instructions for eas
Browse files Browse the repository at this point in the history
  • Loading branch information
mugikhan committed Dec 17, 2024
1 parent efff686 commit e72a7ad
Showing 1 changed file with 25 additions and 14 deletions.
39 changes: 25 additions & 14 deletions packages/react-native/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# PowerSync SDK for React Native

*[PowerSync](https://www.powersync.com) is a sync engine for building local-first apps with instantly-responsive UI/UX and simplified state transfer. Syncs between SQLite on the client-side and Postgres, MongoDB or MySQL on the server-side.*
_[PowerSync](https://www.powersync.com) is a sync engine for building local-first apps with instantly-responsive UI/UX and simplified state transfer. Syncs between SQLite on the client-side and Postgres, MongoDB or MySQL on the server-side._

This package (`packages/react-native`) is the PowerSync SDK for React Native clients. It is an extension of `packages/common`.

Expand Down Expand Up @@ -71,13 +71,24 @@ module.exports = function (api) {
};
```

## Metro config (optional)
### Expo EAS config (optional)

If you are using this library in an Expo project and encounter issues with multiple versions of SQLite3, the conflict might be due to `expo-updates` also depending on SQLite. To resolve this, you can configure Expo to use the third-party SQLite pod.

Update your `ios/Podfile.properties.json` to include the following configuration:

```json
{
"expo.updates.useThirdPartySQLitePod": "true"
}
```

### Metro config (optional)

When using a bare React Native app without a framework like Expo, the `@powersync/react-native` package does not work well with inline requires.

If you see the following error message


```bash
Super expression must either be null or a function
```
Expand All @@ -86,17 +97,17 @@ then you will need to add this to your `metro.config.js`:

```js
const config = {
transformer: {
getTransformOptions: async () => ({
transform: {
inlineRequires: {
blockList: {
[require.resolve("@powersync/react-native")]: true,
},
},
},
})
}
transformer: {
getTransformOptions: async () => ({
transform: {
inlineRequires: {
blockList: {
[require.resolve('@powersync/react-native')]: true
}
}
}
})
}
};
```

Expand Down

0 comments on commit e72a7ad

Please sign in to comment.