onAction

fun onAction(interceptor: (action: Any, next: () -> Unit) -> Unit)(source)

Add an action interceptor. Call next() to proceed, or skip to suppress the action. Action is Any — cast to inspect.

Note: next() launches a coroutine and returns immediately. To measure action execution time, use onActionExecution instead.