Replies: 1 comment 1 reply
-
Hi @x-0o0, the test failure is correct, and I think you may have some confusion about how binding actions work. When you send the If you want to execute the logic inside |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First of all, here is my very simple swift package that includes 2 swift files: one for defining the reducer and the other one is for testing the reducer
Experiment.zip
Here's the simplified reducer code:
This reducer describes that the user can select the items to delete after tapped edit button and then delete items by tapping delete button. Also, if there's no selected item, delete button should be disabled.
From my test code, I expected
binding(\.selectedItemIDs)
action to be called when I send.deleteButtonTapped
via store, because it resets theselectedItemIDs
when receives the.deleteButtonTapped
action. However it doesn't.Why it doesn't invoke the binding action?
Beta Was this translation helpful? Give feedback.
All reactions