Closed nmalevich closed 1 month ago
Hi @nmalevich, you need to make sure to use the ifLet
operator to integrate the alert's behavior into your feature:
Reduce { state, action in
…
}
.ifLet(\.$alert, action: \.alert)
That should fix it.
Since this isn't an issue with the library I am going to convert it to a discussion. Please feel free to continue the conversation over there!
Description
I use AlertState, @Presents and present method of UIViewController for showing alerts I don't have any problems with first show, but after first dismiss property in my state for alerts isn't nil, it is still previous value. So when I try to show next time, it will be nothing, because state isn't change
Checklist
main
branch of this package.Expected behavior
State of alert after dismissing is nil
Actual behavior
State of alert after dismissing isn't nil
Reproducing project
UIKitAlertDismissButtonBugExample.zip
The Composable Architecture version information
1.15.0
Destination operating system
iOS 17.6.1
Xcode version information
15.4
Swift Compiler version information