how can i call another dispatch when first dispatch done? #3535
Answered
by
ramarivera
giovannidias1
asked this question in
Q&A
-
I have a first diaspatch that send a question and second that load a questions list
but the second one is called when the first is not finished yet what's the best way to do that? |
Beta Was this translation helpful? Give feedback.
Answered by
ramarivera
Aug 15, 2022
Replies: 1 comment
-
Assuming that "sending" a question ends up being an API call (or some "long" running process), you could have an effect listening to You could then do something like
Not claiming it's the best way, just a way |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
giovannidias1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Assuming that "sending" a question ends up being an API call (or some "long" running process), you could have an effect listening to
sendAnswer
, and when it finishes processing it (whatever that means in your context), then this effect would dispatch another action e.g.answerSent
.You could then do something like
Not claiming it's the best way, just a way