DispatchObserverDispatchable
public protocol DispatchObserverDispatchable : Dispatchable
Protocol implemented by a dispatchable that wants to be dispatched in response to the dispatch of another dispatchable
-
Creates the dispatchable item. If for any reason, the init decides that the dispatchable should not be sent to the Store, the init can fail (that is, returns nil)
Declaration
Swift
init?(dispatchedItem: Dispatchable, prevState: State, currentState: State)Parameters
dispatchedItemthe item that triggered the init
prevStatethe last state before current changes
currentStatethe current state
Return Value
either the dispatchable item or nil
View on GitHub
DispatchObserverDispatchable Protocol Reference