-
Notifications
You must be signed in to change notification settings - Fork 12
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
Async and dispatch clarification #17
Comments
Hi, I think you are questioning about usage of deox with thunk. Am I right? |
Yes, or with another similar middleware such as |
Middlewares in redux don't change the anatomy and functionality of reducers. Action handlers are fundamental reducer portions. So there should not be any direct interaction of the middlewares with action handlers. const increment = createAction('INCREMENT')
const incrementAsync = () => dispatch =>
setTimeout(() => dispatch(increment()), 500)
const root = createReducer(0, handleAction => [
handleAction(increment, state => state + 1)
])
store.dispatch(incrementAsync()) |
I will close the issue but feel free to re-open it. |
I don't fully understand how to implement asynchronous actions or dispatch more actions from a handler. Could you clarify this in document?
The text was updated successfully, but these errors were encountered: