An odd case of a fired "binding" action and a enum
State
#1377
-
(I'm using the protocol beta branch with this). It takes a few steps to explain the setup... FirstI've created a fairly small app that has an enum at the top level to drive which "section" of the app the user is in.
SecondIn the Login feature I use two
ThirdI also have an action in the FourthThe view then brings these together...
FinallyIn the
The problemWhen I tap the "Validate PIN" button it sends the action. Then the back end is called. Then the success response is received and the above reducer switches to the If the user still has the PIN number field then it seems like SwiftUI is implicitly updating the binding when the view is dismiss. This triggers two purple warnings. One for the I tried to manually set the I tried another update about using a Not sure where to go with this next. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
OK... I'm fairly certain this is a bug with SwiftUI/Xcode 14. From here there is a post near the bottom that links to a video... https://developer.apple.com/forums/thread/711899 By adding Which is really odd... |
Beta Was this translation helpful? Give feedback.
OK... I'm fairly certain this is a bug with SwiftUI/Xcode 14.
From here there is a post near the bottom that links to a video...
https://developer.apple.com/forums/thread/711899
By adding
.buttonStyle(BorderlessButtonStyle())
to the buttons the error about publishing changes goes away.Which is really odd...