CaseLet wihout action #1941
Unanswered
artemkrachulov
asked this question in
Q&A
Replies: 2 comments
-
The simplest thing right now would be to add action cases for all state cases, even if they don't need actions, and just use the enum SwitchContentAction<T: Equatable>: Equatable {
case loading(Never)
case loaded(T)
case error(Never)
} Then it should work just fine: CaseLet(state: /SwitchContentState.loading, action: SwitchContentAction.loading) { store in Then you don't even need to do |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you @mbrandonw ! |
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.
-
I would like to build SwitchStore from enum where not all cases have associated values
And use like that
The idea, is to not overload with reducers and use only one reducer for loaded case. For rest cases use plain SwitUI views. Can you help?
Beta Was this translation helpful? Give feedback.
All reactions