Handling Undo & Redo in SwiftUI

The UndoManager type, available in Apple's Foundation framework, provides a general-purpose recorder of operations that enables undo and redo actions. In this post, Matthaus Woolard describes a Provider pattern he uses to improve how UndoManager integrates with SwiftUI.