-
MiddlewareApiType protocol
See moreDeclaration
Swift
public protocol MiddlewareApiType
-
Store implementation
See moreDeclaration
Swift
public struct MiddlewareApi<State>: MiddlewareApiType
-
applyMiddlware creates a StoreEnhancer from an array of Middleware
Strongly typed signature
typealias MiddlewareApi = MiddlewareApi<State> typealias Middleware = MiddlewareApi -> DispatchTransformer typealias StoreCreator = (reducer: Reducer, initialState: State?) -> Store<State> typealias StoreEnhancer = StoreCreator -> StoreCreator func applyMiddleware(middleware: [Middleware]) -> StoreEnhancer
Returns
StoreEnhancer<State>
Declaration
Swift
public func applyMiddleware<State>(middleware: [MiddlewareApi<State> -> DispatchTransformer]) -> (((State?, Action) -> State, State?) -> Store<State>) -> (((State?, Action) -> State, State?) -> Store<State>)
Parameters
middleware
An array of Middleware that accept a MiddlewareApi and return a DispatchTransformer