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

Logic of SAVE progress seems wield #2

Open
Stupidism opened this issue Jan 10, 2017 · 2 comments
Open

Logic of SAVE progress seems wield #2

Stupidism opened this issue Jan 10, 2017 · 2 comments

Comments

@Stupidism
Copy link

Stupidism commented Jan 10, 2017

Use Case

I wanted to add a middleware to modify payload to sync into storage-engine, but failed all the time.

Problem

Turnen out newState is saved into storage-engine before its action dispatched.

I think the right order should be:

  1. dispatch this SAVE action
  2. save into storage-engine in reducer or middleware.
@guns2410
Copy link
Member

What do you mean to modify payload to sync into storage-engine? Does this mean that you need your redux store to have different data than what is stored in the storage-engine?

@Stupidism
Copy link
Author

Stupidism commented Jan 12, 2017

No, it means I want to add redux middleware for SAVE action and modify the payload in the middleware. But failed because of the logic sequence.

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

No branches or pull requests

2 participants