Work in progress
Sketching out how it might be used:
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());
npm install
npm test
npm run lint
npm run fix