ViewData is a pattern we use in my day job for an app written in swiftUI that serves around 550k users per month in the nordic countries. In this video you can learn how make your view code more easy to test and preview and explore how improving this characteristics leads to better UI overall.
The full sample code for this video can be found in https://github.com/fespinoza/Youtube-SampleProjects/tree/movie-catalog/full-app
Snapshot testing video: https://youtu.be/KPJL8vN3lAg?si=H1z9eU5QNqp2bxLm
#swift #swiftUI #ios #snapshot-testing #xcode-previews #architecture
--------------------------------
👋 You can find me in
--------------------------------
- BlueSky: https://bsky.app/profile/fespinozacast.bsky.social
- Github: https://github.com/fespinoza
--------------------------------
📸 Camera Gear
--------------------------------
- Camera: Sony A6700
- Lens: Sigma 16mm 1.4 for Sony E
- Elgato Prompter
- Elgato StreamDeck
- Key Light: Godox ML100Bi with Godox QR-P90 90cm softbox
- Mic #1: DJI mic 2 + DJI lavalier mic
- Mic #2: Elgato Wave DX + Elgato Wave XLR
- M1 Max Macbook Pro
- Screen Recording: CleanShot X
--------------------------------
Chapters:
--------------------------------
00:00 - Start
01:04 - 1. The Pattern
02:46 - 2. Objectives
03:43 - 3. Demo Project
04:04 - 3.1. Design and Data
04:31 - 3.2. Build the UI
07:53 - Rabbit Hole #1 - Stateless images
10:07 - Rabbit Hole #2 - Snapshot testing
12:02 - 3.3. DTO + HTTP Client
12:49 - 3.4. Putting things together
15:35 - 3.5. Did I achieve my goals?
16:13 - 4. Summary
16:37 - Outro