https://github.com/captbaritone/redux-dropbox-middleware
Persist/rehydrate your redux state to/from Dropbox
https://github.com/captbaritone/redux-dropbox-middleware
Last synced: 9 months ago
JSON representation
Persist/rehydrate your redux state to/from Dropbox
- Host: GitHub
- URL: https://github.com/captbaritone/redux-dropbox-middleware
- Owner: captbaritone
- Created: 2017-08-02T23:37:30.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-03T00:07:27.000Z (over 8 years ago)
- Last Synced: 2025-01-10T23:32:13.291Z (about 1 year ago)
- Language: JavaScript
- Size: 43.9 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://travis-ci.org/captbaritone/redux-dropbox-middleware)
# Redux Dropbox Middleware
Work in progress
## Usage
Sketching out how it might be used:
```JavaScript
import {createStore, combineReducers, applyMiddleware} from 'redux';
import {
createDropboxMiddleware,
dropboxReducer,
wrapDropboxState,
DropboxActionCreators
} from 'redux-dropbox-middleware';
import todosReducer from './reducers';
import initialState from './initialState';
const reducer = combineReducers({
// Allow Dropbox middleware to write to this portion of the state.
todos: wrapDropboxState(todosReducer),
dropbox: dropboxReducer
});
const store = createStore(
reducer,
initialState,
applyMiddleware(
createDropboxMiddleware({
// Options
})
)
);
store.dispatch(DropboxActionCreators.login());
```
## Development
1. Install dependencies: `npm install`
2. Run tests: `npm test`
3. Run linter: `npm run lint`
4. Fix lint errors: `npm run fix`