Unlock This Episode
Our Free plan includes 1 subscriber-only episode of your choice, plus weekly updates from our newsletter.
We have finished our refactor, and though there were a few bumps along the way, we got through it, and it is already greatly simplifying our inventory list domain. The inventory list view and view model get to handle fewer responsibilities, and we push more domain specific responsibilities to the row view and row view model.
While it’s true that creating child view models is a little gnarly, the benefits from doing so are tremendous. If we wanted to, we could completely split the inventory list domain from the item row domain, putting them in completely separate modules and making it easier to build, test, and run them in isolation.
Don’t forget, but the whole reason we did this refactor was to add new features for editing and duplicating items to the row domain, so now let’s flex these muscles by adding more functionality to the row and show that it does not needlessly bloat the parent domain. We are going to add two more buttons to the row: one for editing the item, and one for duplicating the item. And just to make things interesting we are going to show the edit screen in a modal sheet and the duplicate screen in a popover.
After 9 episodes exploring SwiftUI navigation from the ground up, we open sourced a library with all new tools for making SwiftUI navigation simpler, more ergonomic and more precise.
An in-depth explaining on view identity, lifetime, and more, and crucial to understanding how
The ability to break down applications into small domains that are understandable in isolation is a universal problem, and yet there is no default story for doing so in SwiftUI. We explore the problem space and solutions, in both vanilla SwiftUI and the Composable Architecture.