Use @StateObject for iOS 15+ alert modifier. (#1860)

This commit is contained in:
Brandon Williams
2023-01-23 16:04:28 -08:00
committed by GitHub
parent b524b01be3
commit 6f33e07a7a
2 changed files with 2 additions and 2 deletions

View File

@@ -40,7 +40,7 @@ extension View {
// NB: Workaround for iOS 14 runtime crashes during iOS 15 availability checks.
@available(iOS 15, macOS 12, tvOS 15, watchOS 8, *)
private struct NewConfirmationDialogModifier<Action>: ViewModifier {
@ObservedObject var viewStore: ViewStore<ConfirmationDialogState<Action>?, Action>
@StateObject var viewStore: ViewStore<ConfirmationDialogState<Action>?, Action>
let dismiss: Action
func body(content: Content) -> some View {