Skip to content
This repository has been archived by the owner on Dec 24, 2019. It is now read-only.

async actions #2

Closed
lalitkapoor opened this issue Jul 14, 2015 · 1 comment
Closed

async actions #2

lalitkapoor opened this issue Jul 14, 2015 · 1 comment

Comments

@lalitkapoor
Copy link

How would you handle passing the state to the client if the actions were async?

@bananaoomarang
Copy link
Owner

I just updated to repository to be in line with what I'm doing here

Which makes this easier, though I haven't gotten round to implementing it yet. At the moment my plan is to assign required async actions somehow to the components. Something like:

static asyncActions = [actionCreator1, actionCreator2]

Then wait for a promise queue to finish before sending the response from the server.

But first I'm going to fix the ugly actionCreator()(this.props.dispatch) by wrapping async actions in promises and using some Redux middleware.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants