Middleware

  • Extends the store functionality by providing a middle layer between dispatched actions and the store’s reducer.

    Before an action is given to a reducer, middleware have an opportunity to handle it themselves. They may dispatch their own actions, transform the current action, or block it entirely.

    Middleware can also be used to set up external hooks from services.

    See more

    Declaration

    Swift

    public protocol Middleware
  • Use the ‘+’ operator to combine two or more middleware together.

    See more

    Declaration

    Swift

    public struct CompositeMiddleware<State, A, B> : Middleware where State == A.State, A : Middleware, B : Middleware, A.State == B.State
  • A simple middleware to perform any handling on a dispatched action.

    See more

    Declaration

    Swift

    public final class HandleActionMiddleware<State> : Middleware