Replies: 1 comment 3 replies
-
Hi @Badlazzor, the behavior you are witnessing is unfortunately expected, though not necessary ideal. I believe this behavior is documented, but I couldn't find it and so I will have to look into that. But currently the So, we do plan on fixing this issue, but it will have to wait for 2.0. Since we do not consider this an issue with the library today I am going to convert it to a discussion. Please feel free to continue the conversation over there. |
Beta Was this translation helpful? Give feedback.
-
Description
Consider having a Reducer that has 4 actions:
It also shares the As and Bs in a
@Shared [A: IdentifiedArray<B>]
State.The Reducer should do the following:
fetchA
.run
, sendingresultForA
when donefetchB
, but before that updates the@Shared
state with the As adding empty arrays for each entry (for display reasons).run
, sendingresultForB
when done@Shared
state's BsThe problem I see is when testing and sending
fetchA
to the TestStore the actions are received as expected, but the state changes are accumulated into the first actions changes in the@Shared
state.Checklist
main
branch of this package.Expected behavior
Sending
fetchA
to the TestStore would result in the following:Actual behavior
Sending
fetchA
to the TestStore would result in the following:Steps to reproduce
No response
The Composable Architecture version information
1.13.1
Destination operating system
iOS 17.5
Xcode version information
Version 15.4 (15F31d)
Swift Compiler version information
Beta Was this translation helpful? Give feedback.
All reactions