sergdort / CombineFeedback

Unidirectional reactive architecture using new Apple Combine framework https://developer.apple.com/documentation/combine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Duplicate declarations of feedback static methods in examples

kaishin opened this issue · comments

I noticed that the the when_() -> Feedback<State, Event> static methods are defined both in the viewModel and in the corresponding enum in the examples. It's not necessary given that the view model can just access them from the enum type, ex:

...
feedback: [MoviesList.whenLoading()],
...

Can you please confirm that the current duplication is not the intended way?

Hey @kaishin It's just to illustrate that it's possible to have a global state machine, like in Redux or just one per screen