How to know all async calls are complete when using async thunk? #2902
Unanswered
heart2friend
asked this question in
Q&A
Replies: 2 comments
-
Generally, |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @markerikson thank you for your prompt response. I wasn't aware about this. certainly it help me solve some other scenarios :). I am able to detect whether all async calls are complete or not. I have used "react-promise-tracker" to track "promiseInProgress" on parent component. I have wrapped dispatch inside trackPromise method. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All, I have to keep an option selected by default in dropdown based on some conditions and it will sort data on first load based on selected option. sorting can happen only when all child requests are complete. How we can determine whether all async call made via async thunk are complete and data is loaded? so I can trigger sort.
Here is an example
I have sales order, each sales order can have multiple product. each product can have multiple bin. once all bins are loaded I want to trigger sort. I get products with sales order then it's loaded in component. on Product component giving call to get bin details of product. bins will be rendered in bin component.
Really appreciate the help.
Beta Was this translation helpful? Give feedback.
All reactions