@powersync/react-native 1.12.1 → 1.12.3

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.
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # PowerSync SDK for React Native
6
6
 
7
- _[PowerSync](https://www.powersync.com) is a Postgres-SQLite sync engine, which helps developers to create local-first real-time reactive apps that work seamlessly both online and offline._
7
+ *[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 or MongoDB on the server-side (MySQL coming soon).*
8
8
 
9
9
  This package (`packages/react-native`) is the PowerSync SDK for React Native clients. It is an extension of `packages/common`.
10
10
 
@@ -71,6 +71,35 @@ module.exports = function (api) {
71
71
  };
72
72
  ```
73
73
 
74
+ ## Metro config (optional)
75
+
76
+ When using a bare React Native app without a framework like Expo, the `@powersync/react-native` package does not work well with inline requires.
77
+
78
+ If you see the following error message
79
+
80
+
81
+ ```bash
82
+ Super expression must either be null or a function
83
+ ```
84
+
85
+ then you will need to add this to your `metro.config.js`:
86
+
87
+ ```js
88
+ const config = {
89
+ transformer: {
90
+ getTransformOptions: async () => ({
91
+ transform: {
92
+ inlineRequires: {
93
+ blockList: {
94
+ [require.resolve("@powersync/react-native")]: true,
95
+ },
96
+ },
97
+ },
98
+ })
99
+ }
100
+ };
101
+ ```
102
+
74
103
  # Native Projects
75
104
 
76
105
  This package uses native libraries. Create native Android and iOS projects (if not created already) by running: