Creates an effect that instructs the middleware to flush all buffered items from the channel. Flushed items are returned back to the saga, so they can be utilized if needed.
function* saga() { const chan = yield actionChannel('ACTION')
try { while (true) { const action = yield take(chan) // ... } } finally { const actions = yield flush(chan) // ... }
}
a Channel Object.
Channel
Creates an effect that instructs the middleware to flush all buffered items from the channel. Flushed items are returned back to the saga, so they can be utilized if needed.
Example
function* saga() { const chan = yield actionChannel('ACTION')
}