Enhancing Inter-Reducer Communication #2229
dankinsoid
started this conversation in
Ideas
Replies: 1 comment
-
Also it may be useful to create some State dependency to share state between reducers or even a Store dependency |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear Composable Architecture Community,
I would like to bring to your attention an enhancement proposition for the Composable Architecture (TCA) library that aims at addressing a key challenge often encountered by iOS developers, which is the communication between different segments of logic within TCA .
Issue Description
The prevailing challenge lies in orchestrating a directive, typically in the form of
do something
, from one reducer to another. Conventionally, this communication is facilitated through their mutual ancestor, necessitating a gamut of specialized actions for the ancestor. To my knowledge, this remains the primary method within TCA; should there exist an alternative, I would be deeply appreciative if you could share it with me.The Proposal: Introducing the Send as a dependency
As a solution to the aforementioned issue, I propose some
Send
struct extensions. This approach enables reducers to seamlessly dispatch actions to one another through Dependencies, thereby negating the need to solely rely on their common ancestor.Implementation
I have taken the liberty to implement this proposal in my fork of the Composable Architecture. You can explore the beta implementation in detail here.
Thank you for considering my proposal. I am eager to contribute to the community and engage in further discussions.
Beta Was this translation helpful? Give feedback.
All reactions