stt106
1
Hi,
I started learning to do native iOS development and have just watched an introductory SwiftUI course online. What I find interesting is SwiftUI is very similar to both Vue and flutter in that it uses a declarative syntax (flutter) and the reactivity is similar to Vue.
As a beginner, I have two questions:
- how to manage state in swiftui? Is there a common pattern or there is a library like Vuex in Vue to manage the state?
- At work we are migrating a Vue web app to native mobile apps; what's the commonly recommended architecture pattern in SwiftUI?
Check out The Composable Architecture by PointFree! You'll find it to be quite similar to Vuex/Redux, but with even more of a focus on breaking down your app into small composable pieces and managing side effects. They have a bunch of example apps on the repo, so definitely check those out.
2 Likes