What are the best state management practices for Swift?

Hi,

I'd like to know if there are any good patterns to follow for state management in Swift?

A quick google search returns me a few approaches on Redux like architecture, but given the Combine framework and likes such as the ObservableObject + EnvironmentObject, which seems closer to what Context API in Reactjs represents for most cases, it might be unnecessary.

I think it's out of scope, but ideally, I'd like to find ways in the SwiftUI world to help me assess the app performance, which could help me find patterns or architectures to solve state management in my applications. Otherwise, following the best advice on practices or guidance on how to manage state in Swift is much appreciated!

Meanwhile, when working in XCode and SwiftUI, I find that I can look into redrawing to identify occurrences, but wonder about other approaches or tools that might be more suitable or can provide better insight.

I highly recommend Point-Free's Composable Architecture video collection (and all of their other videos).

1 Like

That is great, thanks a lot for sharing ;)