Skip to content

vzdai/pouchdb-react-native

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

pouchdb-react-native

PouchDB, the ReactNative-only edition. A preset representing the PouchDB code that runs in ReactNative, without any of the code required to run it in Node.js.

The pouchdb-react-native preset contains the version of PouchDB that is designed for ReactNative. In particular, it ships with the AsyncStorage adapters as its default adapters. It also contains the replication, HTTP, and map/reduce plugins.

Usage

npm install pouchdb-react-native --save
import PouchDB from 'pouchdb-react-native'
const db = new PouchDB('mydb')

// use PouchDB
db.get('4711')
  .then(doc => console.log(doc))

For full API documentation and guides on PouchDB, see PouchDB.com.

Sample App

there is a small example app: https://github.com/stockulus/pouchdb-react-native/tree/master/example

pouchdb-adapter-asyncstorage

PouchDB adapter using AsyncStorage as its data store. Designed to run in ReactNative. Its adapter name is 'asyncstorage'.

Usage

npm install pouchdb-adapter-asyncstorage --save
import PouchDB from 'pouchdb-core'
PouchDB.plugin(require('pouchdb-adapter-asyncstorage').default)
const db = new PouchDB('mydb', {adapter: 'asyncstorage'})

// use PouchDB
db.get('4711')
  .then(doc => console.log(doc))

development

git clone https://github.com/stockulus/pouchdb-react-native.git
cd pouchdb-react-native
npm install
cd example
npm run ios

Twitter: @stockulus

js-standard-style

About

Pouchdb with async storage

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 88.8%
  • Objective-C 7.2%
  • Python 2.3%
  • Java 1.7%