https://github.com/dohaki/pouchdb-adapter-react-native-mmkv
Fast PouchDB adapter for react-native-mmkv.
https://github.com/dohaki/pouchdb-adapter-react-native-mmkv
mmkv pouchdb react-native
Last synced: about 1 year ago
JSON representation
Fast PouchDB adapter for react-native-mmkv.
- Host: GitHub
- URL: https://github.com/dohaki/pouchdb-adapter-react-native-mmkv
- Owner: dohaki
- Created: 2021-04-15T16:37:01.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-31T05:57:48.000Z (about 5 years ago)
- Last Synced: 2025-05-18T17:17:25.105Z (about 1 year ago)
- Topics: mmkv, pouchdb, react-native
- Language: TypeScript
- Homepage: https://github.com/dakingha69/pouchdb-adapter-react-native-mmkv
- Size: 275 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pouchdb-adapter-react-native-mmkv
## **EXPERIMENTAL: Still needs proper testing and further optimizations!!!**
## Introduction
This is an **experimental** [PouchDB](https://github.com/pouchdb/pouchdb) adapter for [react-native-mmkv](https://github.com/mrousavy/react-native-mmkv).
## How to Use
### 1. Install `react-native-mmkv`
- https://github.com/mrousavy/react-native-mmkv
### 2. Install `pouchdb^7` compatible to react-native
For example, one of the following:
- https://github.com/craftzdog/pouchdb-react-native
- https://github.com/stockulus/pouchdb-react-native
### 3. Install `pouchdb-adapter-react-native-mmkv`
```
yarn add pouchdb-adapter-react-native-mmkv
```
### 4. Set up in your app
```js
import PouchDB from "@craftzdog/pouchdb-core-react-native";
// OR
import PouchDB from "pouchdb-react-native";
import { MMKV } from "react-native-mmkv";
import MMKVAdapterFactory from "pouchdb-adapter-react-native-mmkv";
const MMKVAdapter = MMKVAdapterFactory(MMKV);
const MMKVPouchDB = PouchDB.plugin(MMKVAdapter);
const myDB = new MMKVPouchDB("myDB", { adapter: "mmkv" });
```
## Development Setup
1. Clone repo and `cd` into it
2. Install dependencies and build lib
```bash
yarn && yarn build
```
3. Run example
```bash
cd example && yarn && react-native run-ios
```