Thumbtack Daniel Roth Aug 16, 2023

Transitioning to SwiftUI

Article Summary

Daniel Roth from Thumbtack rebuilt their entire iOS component library from scratch in SwiftUI. The result? Faster builds, fewer bugs, and a development experience that finally lives up to the hype.

When Apple launched SwiftUI in 2019, Thumbtack's iOS team saw potential but waited until iOS 15 to make the leap. Rather than wrap their existing UIKit components, they made the bold call to rebuild their entire Thumbprint design system natively in SwiftUI—a decision that required rethinking fundamental assumptions about how UI code works.

Key Takeaways

Critical Insight

Thumbtack's SwiftUI migration delivered measurably faster development cycles, simpler code, and fewer bugs by embracing declarative thinking over imperative patterns.

The team hit two major technical catch-22s that almost derailed the project—here's how they solved them with custom environment variables.

About This Article

Problem

Thumbtack's UIKit-based Thumbprint design system didn't work well with SwiftUI's declarative approach. Developers had to choose between wrapping old components or rebuilding everything from scratch to take advantage of what SwiftUI offers.

Solution

Daniel Roth's team rebuilt the component library in SwiftUI from the ground up. They used environment variables like `tpButtonWidth` and `tpButtonTheme` to handle configuration patterns that Apple's built-in modifiers couldn't support because of how view hierarchies work.

Impact

The SwiftUI calendar component removed limitations that existed in the UIKit version. Users can now tap navigation buttons as quickly as they want without the controls disabling, and the component responds instantly instead of having the preloading delays that came with the three-page scroll view pattern.