ViewController is presented for Optional Destination Reducer case payload #3388
Replies: 1 comment 3 replies
-
Hi @BastianKusserow, this is the expected behavior. The optionality of And as for the second issue you mentioned, your project doesn't actually compile for me, but that behavior seems to work just fine when I run the various case studies from the Swift Navigation repo. If you can create a repro project that compiles I can take a look. 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! |
Beta Was this translation helpful? Give feedback.
-
Description
Hey!
I just encountered a unexpected behaviour in TCA in conjunction with swift-navigation. Whenever you have a Destination reducer that presents non TCA features, if the associated value of that case is optional, the presentation tools immediately present those features / invoke the presentation closure of swift-navigation. Additionaly, whenever I try to present the feature again, after dismissing the first screen, nothing happens.
A reproduction example of the issue is attached.
Checklist
main
branch of this package.Expected behavior
I'd expect that the feature is only displayed when the destination state actual matches the case.
Actual behavior
the feature is displayed immediately and cannot be presented again.
Reproducing project
UIKitNavigation.zip
The Composable Architecture version information
1.15.0
Destination operating system
iOS 17
Xcode version information
15.4
Swift Compiler version information
No response
Beta Was this translation helpful? Give feedback.
All reactions