ActionDispatcher

public protocol ActionDispatcher

An ActionDispatcher is an object which takes an action to modify a given state - SeeAlso: Action, for the object which will be dispatched

  • Apply a given action to a given state to return the changed state modified by all reducers who are responsible for this state

    See also

    Action, for the object which will be dispatched

    Declaration

    Swift

    func dispatch(_ action: Action...)

    Parameters

    state

    The current state to be modified

    action

    The actions to modify the current state

    Return Value

    A new modified state

  • Undocumented

    Declaration

    Swift

    func dispatch(_ action: Action, completion: @escaping () -> Void)