Hi Stjepan,
Shawn
1

Hi Shawn,

Yes I would go with isRefreshing flag somewhere in your store too. First refresh sets it to true, and all subsequent ones wait until it is changed.

You can have refreshError value in your store too that will be null by default, and that would change if error fails.

After refresh finishes all sagas that were waiting for it can check was it successful or not by checking the refreshError value, and act accordingly.

You could even race refreshSuccess and logout events, and if the logout is first you cancel refresh.

You can find more info here:

I hope this helps you!