I want to pause all dispatched thunks when I am offline and resume when I'm back online. Is createListenerMiddleware a good option for this?
I could create like a seperate redux slice to save the dispatched actions and just redispatch them, but this will lead to existing thunks returning a rejected Promise and throwing errors where called. I want the consumers to just not resolve the promise until internet is back again.
Would you use createListenerMiddleware for this or how can I pause redux thunk actions until online event triggers. I guess I cannot intercept thunks in normal middleware, right?
I tried also different libraries for that but I could not get any of them working because not maintained / broken types / etc.