🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@brighte/redux-persist-realm

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brighte/redux-persist-realm

A Realmjs interface for redux-persist

latest
Source
npmnpm
Version
0.1.6
Version published
Maintainers
1
Created
Source

Redux-persist-realm

A Realmjs interface for redux-persist

Dependencies

  • Realm : Docs, npm
  • Redux-persist : Docs, npm

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

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 if you see something missing!

Keywords

realm

FAQs

Package last updated on 10 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts