onIntent

open suspend fun PipelineContext<S, I, A>.onIntent(intent: I): I?

A callback which is invoked each time an MVIIntent is received and then begun to be processed. This callback is invoked after the intent is sent, sometimes after significant time if the store was stopped or even never if the store's buffer overflows or store is not ever used again.

  • Return null to veto the processing and prevent other plugins from using the intent.

  • Return another intent to replace intent with another one and continue with the chain.

  • Return intent to continue processing, leaving the intent unmodified.

  • Execute other operations using PipelineContext.