-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
How to dispatch many actions in one action creator #1
Comments
I'd probably let action creator return a function. If it's a function, it's given |
I added support for async ACs as described above. For now, they can't access the state—I'll probably get back to it at some point, but I don't want to rush an API. |
gaearon
added a commit
that referenced
this issue
Jun 2, 2015
Update: you can do this now. // Could also look into state in the callback form
export function incrementIfOdd() {
return (dispatch, state) => {
if (state.counterStore.counter % 2 === 0) {
return;
}
dispatch(increment());
};
} |
Closed
2 tasks
webMasterMrBin
pushed a commit
to webMasterMrBin/redux
that referenced
this issue
Aug 21, 2021
Update part-5-ui-and-react.md
webMasterMrBin
pushed a commit
to webMasterMrBin/redux
that referenced
this issue
Aug 21, 2021
Update part-5-ui-and-react.md Former-commit-id: 9dbfd03
nevilm-lt
pushed a commit
to nevilm-lt/redux
that referenced
this issue
Apr 22, 2022
Merge downstream
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have some example on fluce:
How to implement same action creator in redux? Should I create action creator for every action type?
The text was updated successfully, but these errors were encountered: