Protocols

The following protocols are available globally.

  • Defines the interface of Stores in Swift Flow. MainStore is the default implementation of this interaface. Applications have a single store that stores the entire application state. Stores receive actions and use reducers combined with these actions, to calculate state changes. Upon every state update a store informs all of its subscribers.

    See more

    Declaration

    Swift

    public protocol Store
  • Implement this protocol on your custom Action type if you want to make the action serializable. - Note: We are working on a tool to automatically generate the implementation of this protocol for your custom action types.

    See more

    Declaration

    Swift

    public protocol StandardActionConvertible: Action
  • All actions that want to be able to be dispatched to a store need to conform to this protocol Currently it is just a marker protocol with no requirements.

    Declaration

    Swift

    public protocol Action { }