rgommezz/react-native-offline

Check when action queue is being released

mohameddroussi opened this issue · 1 comments

Question, I have a components that keeps re-rendering when the action queue is being released, I would like to show synching or some progress indicator while the queue is releasing. Is there a way to do that?

Hey @mohameddroussi,

You can derive that state from the network reducer as per the below:

const isReleasing = network.isConnected && network.actionQueue.length > 0 && !network.isQueuePaused