For example, if a view has several error states, it'd be more ergonomic to have one error object which can be set, and if so, a toast appears. ```swift HStack { // ... } .toast(item: $currentError) { currentError in Text(currentError.localizedDescription) } ```
For example, if a view has several error states, it'd be more ergonomic to have one error object which can be set, and if so, a toast appears.