Skip to content

Commit

Permalink
update react native docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wernst committed Dec 5, 2024
1 parent a80dbe0 commit f23ddf9
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion packages/docs/src/pages/frameworks/react-native.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,23 @@ config.resolver.resolveRequest = customResolver;
module.exports = config;
```

### 3. Configure polyfills
### 3. Configure Babel (optional)

If you are building for the web, you'll need to update a babel configuration file. At the root of your Expo project, create a `babel.config.js` file with the following content:

```javascript
module.exports = function (api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
assumptions: {
enumerableModuleMeta: true,
},
};
};
```

### 4. Configure polyfills

Triplit was originally built to run in web browsers, so a few APIs are used in some core packages and dependencies that are not in the ECMAScript spec that Hermes implements. So you will need to add some polyfills to your project. We list some polyfills below, but you may use other packages or write your own.

Expand Down

0 comments on commit f23ddf9

Please sign in to comment.