Command

public protocol Command

Since we cannot extend or inherit Enums, this protocol serves as the base for all commands. The State reducer State(S) * Event(E) → Action (A), State (S’) accepts an Event and emits this Command as action or state change.

  • command() Default implementation

    Self as Command

    Default Implementation

    Self as Command

    Declaration

    Swift

    func command() -> Self