Closed zhenyataranr10 closed 10 months ago
Same issue. On 1.5.1 everything is fine
Fixed by #2648.
Hi @zhenyataranr10, this was fixed in 1.5.5. Can you update and confirm?
Hi @zhenyataranr10, this was fixed in 1.5.5. Can you update and confirm?
@mbrandonw Yeah fix works. Thanks!
@Reducer
struct Splash {
// MARK: - Define States/Actions
@ObservableState
struct State: Equatable {
var isLoading = false
}
enum Action: Equatable {
case load
case loaded
case delegate(Delegate)
enum Delegate: Equatable {
case mainNavigation
}
}
// MARK: - Define Dependencies
var body: some Reducer<State, Action> {
Reduce { state, action in
switch action {
case .load:
state.isLoading = true
return .run { send in
try? await configure()
try? await prepareData()
await send(.loaded)
}
case .loaded:
state.isLoading = false
return .send(.delegate(.mainNavigation))
case .delegate:
return .none
}
}
}
}
I'm using ver 1.9.2. But this issue still happens. After send(.loaded) inside run, loaded-action not work
Hi @Cu-Toof, can you please provide a minimal, compiling project that demonstrates the behavior you are seeing? Also please start a new discussion instead of responding to this old issue.
@mbrandonw Sorry, I made a mistake in preparing the data prepareData()
.
Description
Actually don't know why, but sometimes in Reducer actions that sends from run not receives in reducer
` @Reducer struct ChatReducer: Reducer {
}`
in this case not receiving any action of
messageResult
Checklist
main
branch of this package.Expected behavior
No response
Actual behavior
No response
Steps to reproduce
No response
The Composable Architecture version information
1.5.4
Destination operating system
17.0
Xcode version information
15.0.1
Swift Compiler version information