📔 100 Days of SwiftUI (Day 36)
Finished Day 36 in 100 Days of SwiftUI.
This section explores data sharing and data persistence with UserDefaults in SwiftUI. I learned about the @Environment and @AppStorage property wrappers, the @Observable macro in the Observation framework, and encoding or decoding custom data types with Codable.
We covered key concepts with custom types and Codable using JSONEncoder to encode data. Then, we removed data with onDelete, the EditButton, and remove(atOffSets). Finally, we learned how to programmatically dismiss a sheet using sheet(isPresented).
Data storage and persistence is foundational for most apps, so I expect to use these pieces a lot.