# @brighte/redux-persist-realm

> A Realmjs interface for redux-persist

Latest version **0.1.6** (published 2018-06-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @brighte/redux-persist-realm
pnpm add @brighte/redux-persist-realm
yarn add @brighte/redux-persist-realm
bun add @brighte/redux-persist-realm
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.6 |
| Published | 2018-06-10 |
| First published | 2018-06-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jingtai Piao |
| Maintainers | brighte |
| Keywords | realm, redux-persist, react-native, persistor, realmjs |

## Links

- npm: https://www.npmjs.com/package/@brighte/redux-persist-realm
- Repository: https://github.com/jp928/redux-persist-realm
- Homepage: https://github.com/jp928/redux-persist-realm#readme
- Issues: https://github.com/jp928/redux-persist-realm/issues
- npm.io page: https://npm.io/package/@brighte/redux-persist-realm

## Dependencies (1)

- [core-js](https://npm.io/package/core-js.md) ^2.5.7

## Recent versions

- 0.1.6 (latest) — 2018-06-10
- 0.1.5 — 2018-06-10
- 0.1.4 — 2018-06-10
- 0.1.3 — 2018-06-10
- 0.1.2 — 2018-06-10
- 0.1.1 — 2018-06-09
- 0.1.0 — 2018-06-09

## README

# Redux-persist-realm

A Realmjs interface for redux-persist

## Dependencies

- Realm : [Docs](https://realm.io/docs/javascript/latest/), [npm](https://www.npmjs.com/package/realm)
- Redux-persist : [Docs](https://github.com/rt2zz/redux-persist), [npm](https://www.npmjs.com/package/redux-persist)

## Installation

### If you already have realm and redux-persist

```
npm i --save redux-persist-realm
# or
yarn add redux-persist-realm
```

### Else

```
npm i --save redux-persist realm redux-persist-realm
# or
yarn add redux-persist realm redux-persist-realm
react-native link realm
```

## Usage

```diff
import {compose, applyMiddleware, createStore} from 'redux'
import {persistStore, autoRehydrate} from 'redux-persist'
+ import realmPersistInterface from 'redux-persist-realm'

// add `autoRehydrate` as an enhancer to your store (note: `autoRehydrate` is not a middleware)
const store = createStore(
  reducer,
  undefined,
  compose(
    applyMiddleware(...),
    autoRehydrate()
  )
)

+ const config = {
+   storage: realmPersistInterface
+ }

// begin periodically persisting the store
- persistStore(store)
+ persistStore(store, config)
```

Don't hesitate to publish [Issues](https://github.com/Osedea/redux-persist-realm/issues) if you see something missing!

---
_Source: https://npm.io/package/@brighte/redux-persist-realm · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
