Replies: 1 comment 1 reply
-
Hi @pomozoff, generic reducers are completely fine in TCA, but you cannot use the To be honest, generic reducers seem to be a tool for building library code that are integrated into app features, rather than app features themselves. And so from that perspective "view actions" don't actually seem to be that useful. However, if you really want to use view actions, then you can just implement what The only thing you can't recover that the macro provides is the lint warnings that let you know when you are sending an action directly into the store: But again, since generic reducers tend to be library code, I don't think that's a huge deal. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've a generic reducer defined like as following:
I'd like to use view actions separately from domain actions with the macro
@ViewAction(for:)
, but I don't know how to configure the generic for the Feature in my View:Is it a good practice to use generic reducers in TCA?
Beta Was this translation helpful? Give feedback.
All reactions