Closed gaurav-gogia closed 6 years ago
I am assuming that you are able to handle the API call and your actual problem is related to loading status only.
Well, I would have preferred to go for a callback function instead of using async/await. So that, I can change the state of the loader again using that callback function in the API call.
But Since you are using async/await, Have you tried calling the "toggleLoading()" again after the "createLink()" call?
@DesmondANIMUS Make a post to the facebook group. Let's help you out there. Make sure you close this issue.
Sure
Hi all!
I have an async action and I wish to handle loading.
The async action is a simple post API call. I wish to start loading when the call is started and end loading when the call ends. Here is my code. I am able to dispatch the event and take care of API part but I'm not able to fix this loading issue. Someone told me to add the loading state to the store itself but I still can't figure it out. Please advise.
Thanks!