Session

Building Reusable SwiftUI Components

SwiftUI makes it easy to create beautiful UIs in no time, but it is just as easy to end up with a giant view that mixes view code and business logic. Fortunately, Apple gave us some tools to keep the bloat in check and write maintainable and reusable code.

In this talk, I am going to show you how to

* refactor an existing SwiftUI view to make it more maintainable,
* turn it into a reusable SwiftUI component,
* add event handling,
* make the view configurable,
* make the view styleable
* add it to the Xcode component library,
* turn it into a shareable component that can be consumed via Swift Package Manager,
* and distribute it via GitHub and the Swift Package Index

Slides for this talk: https://speakerdeck.com/peterfriese/building-reusable-swiftui-components-98b3272c-3056-44ad-879c-2780c1f89e2d

I can also deliver this talk as a workshop, based on the DocC tutorial I wrote for it: https://peterfriese.github.io/Building-SwiftUI-Components-Tutorial/tutorials/tutorial-table-of-contents/

Peter Friese

Developer Advocate, Firebase

Hamburg, Germany

View Speaker Profile

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top