# pouchdb-react-native

> PouchDB Bundle for ReactNative

Latest version **6.4.1** (published 2018-03-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install pouchdb-react-native
pnpm add pouchdb-react-native
yarn add pouchdb-react-native
bun add pouchdb-react-native
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 6.4.1 |
| Published | 2018-03-22 |
| First published | 2016-06-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 483 |
| Author | Christoph Stock |
| Maintainers | stockulus |
| Keywords | pouchdb, react-native, asyncstorage, offlinefirst |

## Links

- npm: https://www.npmjs.com/package/pouchdb-react-native
- Repository: https://github.com/stockulus/pouchdb-react-native
- Homepage: https://github.com/stockulus/pouchdb-react-native#readme
- Issues: https://github.com/stockulus/pouchdb-react-native/issues
- npm.io page: https://npm.io/package/pouchdb-react-native

## Dependencies (5)

- [pouchdb-core](https://npm.io/package/pouchdb-core.md) 6.4.3
- [pouchdb-mapreduce](https://npm.io/package/pouchdb-mapreduce.md) 6.4.3
- [pouchdb-replication](https://npm.io/package/pouchdb-replication.md) 6.4.3
- [pouchdb-adapter-http](https://npm.io/package/pouchdb-adapter-http.md) 6.4.3
- [pouchdb-adapter-asyncstorage](https://npm.io/package/pouchdb-adapter-asyncstorage.md) 6.4.1

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 6.4.1 (latest) — 2018-03-22
- 7.0.0-beta-1 (next) — 2018-08-09
- 6.0.1-beta4 (beta) — 2016-09-07
- 6.4.0 — 2017-12-30
- 6.3.4 — 2017-08-13
- 6.2.6 — 2017-05-30
- 6.2.5 — 2017-05-27
- 6.2.4 — 2017-05-20
- 6.2.3 — 2017-05-10
- 6.2.2 — 2017-05-05
- 6.2.1 — 2017-05-04
- 6.2.0 — 2017-04-22
- 6.1.26 — 2017-02-08
- 6.1.25 — 2017-01-06
- 6.1.24 — 2016-12-26
- … 59 more at https://npm.io/package/pouchdb-react-native/versions

## README

![Logo](https://raw.githubusercontent.com/stockulus/pouchdb-react-native/master/static/pouchdb-react-native.png)

pouchdb-react-native
======

PouchDB, the ReactNative-only edition. A preset representing the PouchDB code that runs in ReactNative.

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.

[![bitHound Overall Score](https://www.bithound.io/github/stockulus/pouchdb-react-native/badges/score.svg)](https://www.bithound.io/github/stockulus/pouchdb-react-native) [![npm Package](https://img.shields.io/npm/dm/pouchdb-react-native.svg)](https://www.npmjs.com/package/pouchdb-react-native) [![npm Package](https://img.shields.io/npm/v/pouchdb-react-native.svg)](https://www.npmjs.com/package/pouchdb-react-native) [![travis-ci.org](https://travis-ci.org/stockulus/pouchdb-react-native.svg)](https://travis-ci.org/stockulus/pouchdb-react-native) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/) [![license](https://img.shields.io/npm/l/pouchdb-react-native.svg?maxAge=2592000)](https://opensource.org/licenses/MIT)

### Usage

```bash
npm install pouchdb-react-native --save
```

npm >= 3 / node >= 6 works best, there are some known issues with npm 2

```js
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](http://pouchdb.com/). For details on PouchDB sub-packages, see the [Custom Builds documentation](http://pouchdb.com/custom.html).

### Android limit

On Android asyncstorage has a limitation of 6 MB per default, you might want to increase it

```java
// MainApplication.getPackages()
long size = 50L * 1024L * 1024L; // 50 MB
com.facebook.react.modules.storage.ReactDatabaseSupplier.getInstance(getApplicationContext()).setMaximumSize(size);
```

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

---
[![Twitter URL](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&maxAge=2592000)](https://twitter.com/stockulus) [![GitHub stars](https://img.shields.io/github/stars/stockulus/pouchdb-react-native.svg?style=social&label=Star)](https://github.com/stockulus/pouchdb-react-native)

---
_Source: https://npm.io/package/pouchdb-react-native · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
