Skip to content

Commit

Permalink
docs: add expo setup instructions to installation guide
Browse files Browse the repository at this point in the history
  • Loading branch information
Undertone0809 committed Nov 22, 2024
1 parent a757e64 commit bb1f910
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docs-website/docs/docs/Installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,34 @@ Follow [instructions on React Native Windows website](https://microsoft.github.i
</details>
## Expo setup
The following steps are required to use WatermelonDB with Expo:
1. Install the Babel plugin for decorators:
```sh
expo install @babel/plugin-proposal-decorators
```
2. Add the plugin to your `babel.config.js` file:
```js
module.exports = (api) => {
api.cache(true);
return {
presets: [['babel-preset-expo'], 'nativewind/babel'],
plugins: [['@babel/plugin-proposal-decorators', { legacy: true }]],
};
};
```
3. Run `expo prebuild` to ensure the plugin is included in the build.
4. Run the app using `expo start`.
## NodeJS (SQLite) setup
You only need this if you want to use WatermelonDB in NodeJS with SQLite (e.g. for scripts that share code with your web/React Native app)
Expand Down

0 comments on commit bb1f910

Please sign in to comment.