diff --git a/Sources/ComposableSubscriber/ReceiveReducer.swift b/Sources/ComposableSubscriber/ReceiveReducer.swift index f456176..421b7b7 100644 --- a/Sources/ComposableSubscriber/ReceiveReducer.swift +++ b/Sources/ComposableSubscriber/ReceiveReducer.swift @@ -29,8 +29,8 @@ extension Reducer { public func onReceive( action toReceiveAction: CaseKeyPath>, - onSuccess setAction: @escaping (inout State, V) -> Void, - onFail: OnFailAction? = nil + onFail: OnFailAction? = nil, + onSuccess setAction: @escaping (inout State, V) -> Void ) -> _ReceiveReducer> { self.onReceive(action: toReceiveAction) { state, result in switch result { @@ -46,7 +46,7 @@ extension Reducer { public func onReceive( action toReceiveAction: CaseKeyPath>, - onSuccess toStateKeyPath: WritableKeyPath, + set toStateKeyPath: WritableKeyPath, onFail: OnFailAction? = nil ) -> _ReceiveReducer> { self.onReceive(action: toReceiveAction) { state, result in @@ -63,7 +63,7 @@ extension Reducer { public func onReceive( action toReceiveAction: CaseKeyPath>, - onSuccess toStateKeyPath: WritableKeyPath, + set toStateKeyPath: WritableKeyPath, onFail: OnFailAction? = nil ) -> _ReceiveReducer> { self.onReceive(action: toReceiveAction) { state, result in