swift-composable-architecture
swift-composable-architecture copied to clipboard
[Building Sync-ups Tutorial] fixes in "Editing and deleting a sync-up" chapter
Hi!
Following my last PR, I'm currently reviewing the "Building Sync-ups" tutorial and so far, there is a lot of changes so I've splitted up into one PR per chapter to ease the review of them, continuing with the "Editing and deleting a sync-up" chapter here…
Changes Made:
- Replaced the deprecated
.cornerRadius()
method with the newer.clipShape(.rect(cornerRadius:))
modifier to ensure compatibility with the latest SwiftUI standards. - Updated the delete button to use a
.destructive
role instead of.foregroundColor(.red)
for better semantics. - Fix compilation errors by using
withLock
to ensure safe updates to the sharedsyncUp
state during editing. - Add a step in
SyncUpDetail
tutorial to utilize a type-safe.syncUps
key when updating the parent list after deletion confirmation action. - Make some slight changes in the text of the tutorial documentation due to the removal of outdated commentary regarding delegate actions.