Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for pause and resuming of the saving #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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