SwiftUI logo Learn SwiftUI & Combine

Learnings from five years of component systems applied to the Swift world.

Topics include: SwiftUI Combine Component Design Data Flow APIs Composing Testing Performance Clarity Documentation Device Adapting

Atomic design

Learn how to name components. Apply the single responsibility principle. Find the indivisible component units, and compose them together into larger molecules.

Styling approaches

Extract common styles. Define a style guide. How do you keep styles consistent?

Reusability trade-offs

What sort of components should be resuable? How granular should you go?

Pattern libraries

When do you need a pattern library? Who are they for? How should you manage them?

Testing components

Unit test components. Test the behaviours that matter first. Use type-safety to remove impossible states.

Testing data flow

Test your data flow in isolation. Use test-driven design. Mock APIs and other sources.

Composable component patterns

Components are really composable. Can we reduce boilerplate? What useful component utilities can we make?

Handling errors

Handle errors from publishers. What and when should you show users?

Caching data

Learn how to name components. Apply the single responsibility principle. Find the atomic units, and compose them together.

Improving performance in the right areas

Learn when you should focus on performance. Measure to be informed. Apply optimization techniques.

Automating repetitive tasks

Produce screenshots across many devices.