redux-pouchdb-plus
redux-pouchdb-plus copied to clipboard
Allow for pause and resuming of the saving
Useful, in my case, because I only want to send the local state to the database when we hit milestone actions. Something like transactions, if you will.
store.dispatch( { type: PAUSE_SAVING } );
store.dispatch( this );
store.dispatch( that );
// all went well? Okay, push to the db
store.dispatch( { type: RESUME_SAVING } )