pouchdb-adapter-react-native-mmkv
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

pouchdb-adapter-react-native-mmkv

EXPERIMENTAL: Still needs proper testing and further optimizations!!!

Introduction

This is an experimental PouchDB adapter for react-native-mmkv.

How to Use

1. Install react-native-mmkv

2. Install pouchdb^7 compatible to react-native

For example, one of the following:

3. Install pouchdb-adapter-react-native-mmkv

yarn add pouchdb-adapter-react-native-mmkv

4. Set up in your app

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
yarn && yarn build
  1. Run example
cd example && yarn && react-native run-ios

Readme

Keywords

none

Package Sidebar

Install

npm i pouchdb-adapter-react-native-mmkv

Weekly Downloads

0

Version

0.1.4

License

MIT

Unpacked Size

112 kB

Total Files

21

Last publish

Collaborators

  • dakingha69