What would be best approach of sending actions to the store. #3474
Unanswered
vadimkrutovlv
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hi @vadimkrutovlv, it sounds like you already have an existing |
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
-
Hello everyone!
I recently ran into a situation where I had to update my Feature and add some new functionality to it. This functionality simply loads some data from an API when view appears and updates the view state based on the response.
My question is how to better approach this should extend existing onAppear action in the reducer or create a new one? Extending existing action allows me to avoid sending an extra message to the store, however since I'm almost using only exhaustive testing it brakes a lot of existing tests and some of those tests are not even interested in this new functionality because they're testing something else.
My question is, what is the best way to approach this, should I extend the existing onAppear action in the reducer or create a new one? Extending the existing action allows me to avoid sending an extra message to the store, however, since I'm pretty much only using exhaustive testing, it brakes a lot of existing tests, and some of those tests aren't even interested in this new functionality because they're testing something else.
Creating a new "downloadData" action seems to be reasonable, but it's counterintuitive in the view, because from my understanding actions sent from the view to the store usually should represent real interactions with the view?
Creating a new "downloadData" action seems reasonable, but it feels counterintuitive in the view, since as I understand it, actions sent from the view to the store are usually supposed to represent actual interactions with the view?
Beta Was this translation helpful? Give feedback.
All reactions