In pre 1.0 TCA, there was relatively straightforward was to present a ConfirmationDialog
- scope the
Storein a View modifier to theStateproperty holding an optionalConfirmationDialogStatestruct. - provide a dismiss action
When the optional was populated with state (e.g. made non-nil), the dialog would appear
.confirmationDialog( store.scope(state: \.deleteConfirmationDialog), dismiss: .authAction(.dismissLogoutConfirmationDialog))
But this code does not compile in 1.0. What's the new syntax?
For TCA 1.2.0 you can use this code for your View:
And in your reducer file YourDomainFeature.swift