onExternalControlChanged

open suspend fun onExternalControlChanged(externallyDriven: Boolean)(source)

Called when the store enters or leaves external control.

While a store is externally driven its state is authored by a remote publisher through StoreAction.Hydrate, and every locally dispatched action that is not ExternalControlExempt is dropped. Override this to quiesce work that would otherwise compete with the incoming projection, such as start-up resolution or long-running observation.

Invoked before the dispatch gate engages and after it disengages, so suspend calls and dispatches made from this hook are still processed normally.

Parameters

externallyDriven

true when entering external control, false when leaving it