Skip to content

Allow for pause and resuming of the saving#19

Open
yanick wants to merge 2 commits intomedihack:masterfrom
yanick:pause-resume
Open

Allow for pause and resuming of the saving#19
yanick wants to merge 2 commits intomedihack:masterfrom
yanick:pause-resume

Conversation

@yanick
Copy link

@yanick yanick commented Aug 31, 2018

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 added 2 commits August 30, 2018 20:06
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 } );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant