ReducerContainer

public protocol ReducerContainer : AnyObject, ReducerProvider

An object which stores reducers and gives you all responsible reducers for a given action and state

  • Add a synchron reducer to the container

    Declaration

    Swift

    func addReducer<R>(reducer: R) where R : ActionReducerType

    Parameters

    reducer

    a reducer

  • Add a asynchron reducer to the container

    Declaration

    Swift

    func addReducer<R>(reducer: R) where R : AsyncActionReducerType

    Parameters

    reducer

    a reducer

  • Add a reduce function to the container

    Declaration

    Swift

    func addReduceFunction<StateType, ActionType: Action>(reduceFunction:  @escaping (_ provider: ReducerProvider,_ action: ActionType, _ state: StateType) -> StateType)

    Parameters

    reduceFunction

    a reduce function