Interceptor

public protocol Interceptor

A type which intercepts all Actions and the State changes happening in a Store.

  • The type of State the Interceptor will get.

    Declaration

    Swift

    associatedtype State
  • The function called when an Action is dispatched on a Store.

    Declaration

    Swift

    func actionDispatched(action: Action, oldState: State, newState: State)

    Parameters

    action

    The Action dispatched

    oldState

    The State before the Action was dispatched

    newState

    The State after the Action was dispatched

  • id Default implementation

    The identifier for the Interceptor

    Default Implementation

    Declaration

    Swift

    static var id: String { get }