Replies: 2 comments 7 replies
-
Any chance you could include a view with this example as well? I was starting to test it out to better understand your question and I wasn't exactly sure how the selection logic is implemented form a view standpoint. I think your initial intuition is right regarding ViewState and ViewStore. The protocol doesn't necessary ensure conforming classes will use I think some of the main things are going to be testability and composition. How would your concerns be phrased if they were in the form of a question from your colleagues? This will help me provide more targeted input :) |
Beta Was this translation helpful? Give feedback.
-
In TCA all actions are effectively public. This is required to ensure that all actions are handled in the reducer switch statement. So always treat the I would change the enum DropdownAction<Item: Equatable> {
case loadItems // previously didAppear
case itemsLoaded([Item])
case validateSelection(Item) // previously didSelect(Item)
case didSelect(Item) // previously itemSelectionDidPassValidation(Item)
} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all, I've been using TCA on my personal projects since the early episodes and and successfully pushing for it at work and I feel like the code produced might be the most sophisticated I have ever written. Sometimes I catch myself thinking "I can't believe I'm being paid to write this", but there's something I'm concerned about myself and worried how I'd defend if brought up by colleagues that don't share my excitement of the library:
var
s of states feel exposed for higher level reducers to mutateI'll share how approximately I'd write a View Model of a Dropdown view with comments describing my struggle to find alternatives for good things about our View Model pattern:
Any help/input is highly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions