feat: Adding more helpers, wip

This commit is contained in:
2024-05-30 17:48:34 -04:00
parent ee983f7337
commit 11ddfb04c3
5 changed files with 99 additions and 53 deletions

View File

@@ -127,19 +127,22 @@ struct ReducerWithReceiveAction {
return .none
}
}
Reduce<State, Action> { state, action in
switch action {
case .receive:
return .none
case .task:
return .receive(\.currentNumber) {
try await numberClient.currentNumber()
}
}
.receive(on: \.task, with: \.currentNumber) {
try await numberClient.currentNumber()
}
// Reduce<State, Action> { state, action in
// switch action {
//
// case .receive:
// return .none
//
// case .task:
// return .receive(\.currentNumber) {
// try await numberClient.currentNumber()
// }
// }
// }
}
}