Group Group Group Group Group Group Group Group Group

Redux or Container hierachy for SwiftUI + Combine App?

Hi All,
I bought and read your books like SwiftUI_by_Tutorials, Combine_Asynchronous_Programming_with_Swift and also Advanced_iOS_App_Architecture partially.

So right now I was able to mostly redo whole app by using SwiftUI and Combine and also I tried to follow Container hierarchy pattern. In general I use containers to hold shared state and also as factories for ViewModels (ObservableObject classes) and SwiftUI Views.

Can you please give any opinion if this sounds like good architecture for SwiftUI app?

I’m still trying to figure out in more detail what goes on under the hood but so far (at least in case of my app) all seems to look and work good.

I read various articles on internet and seems to me that most people advocate use of redux (with CombineFeedback framework) for SwiftUI, main argument is that performance drops when using ObservableObject with large complex view hierarchies. Honestly that goes beyond my reach of understanding at the moment but I’m trying to dwell as deep as I can.

So any comment means a lot to me, I’m trying to figure out what will be mainstream for this and to addopt best practice that will be favored by most developers, I know that like always for specific apps architecture will differ like always, right now I’m just trying to figure out safe basic regular but proper way to do things.

1 Like

@rcach Can you please help with this when you get a chance? Thank you - much appreciated! :]