@store-sync/redux-middleware
Version:
Redux middleware that syncs state
21 lines (15 loc) • 387 B
Markdown
# `reduxMiddleware`
Syncs your redux store with a store-sync backend
## Usage
```
import { createStore, combineReducers, applyMiddleware } from 'redux'
import storeSync from '@store-sync/redux-middleware'
import userReducer from './user-reducer'
const sync = storeSync({
url: 'wss://yourbackend.com/'
})
const userStore = createStore(
userReducer,
applyMiddleware(sync)
)
```