redux-pouchdb-plus icon indicating copy to clipboard operation
redux-pouchdb-plus copied to clipboard

Allow for pause and resuming of the saving

Open yanick opened this issue 7 years ago • 0 comments

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 } )

yanick avatar Aug 31 '18 00:08 yanick