Action
public protocol Action
A dispatchable action to update the application state.
enum TodoList : Action {
case setItems(items: [TodoItem])
case addItem(withText: String)
case removeItems(at: IndexSet)
case moveItems(at: IndexSet, to: Int)
}
-
then(_:
Extension method) Chains an array of actions to be dispatched next.
Declaration
Swift
@inlinable public func then(_ actions: [Action]) -> CompositeAction
Parameters
actions
An array of actions to chain together.
Return Value
A composite action.
-
then(_:
Extension method) Chains an array of actions to be dispatched next.
Declaration
Swift
@inlinable public func then(_ actions: Action...) -> CompositeAction
Parameters
actions
One or more actions to chain together.
Return Value
A composite action.
-
then(_:
Extension method) Call the provided block next.
Declaration
Swift
@inlinable public func then(_ block: @escaping () -> Void) -> CompositeAction
Parameters
block
A block of code to execute once the previous action has completed.
Return Value
A composite action.