How to dismiss IonLoading after saga fetch finish?

I’m using IonLoading on my @ionic/react project. First I display the loading to show the progress while calling APIs. The API fetching is handled by a redux-saga function. After saga fetch finish, I want to hide the loading but I can’t find and solution to do that.

Anyone use @ionic/react here? please help me.
@mhartington, I appreciate your help.

Thank you very much!

I had to use redux-saga-thunk to make the dispatch return a promise. Then on the promise resolve event, I can setLoading to false to make it dismiss.

But currently the IonLoading component has a bug on calling setLoading(false). See the reported issue here: