In order to conform to the ReducerProtocol, a conforming Struct either implements reduce(into: action:) method or the var body: some ReducerProtocol computed property. How do I handle the situation where I want to add both to the top level Reducer Protocol Struct?
How to add ad-hoc reducer to top-level var body some ReducerProtocol {Scope A, ScopeB, ScopeC}
301 views Asked by Small Talk At
1
The answer is to add a stand-alone Reducer into the body var, at whatever level you want the relevant action to be processed. From the documentation: