Using enums to drive navigation (from the Modern SwiftUI series) Question - how to derive the destination binding. #1868
Replies: 3 comments 3 replies
-
UPDATE: I was reading one of your blogs on SwiftUI bindings to see if I was doing something wrong and I saw a new way to derive bindings of parts of State using @BindableState property wrapper around the property then using the BindableAction protocol on the Action before using the value as a binding in the View like so:
This seems to work, but I was wondering if anyone knows why the old method isn't working in my case and what the proper way of driving modals is. thanks |
Beta Was this translation helpful? Give feedback.
-
Anyone figured out how to use the new SwiftUINavigation tools in TCA yet ? I know I could wait for next week's episode |
Beta Was this translation helpful? Give feedback.
-
I tried to do something similar to what author did, and almost everything works, except reducer:
I just can't come up with how to scope it to extract child state from |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I was re-watching the series on best practices in modelling navigation in an app and I came across a small issue. I know the Scrumdinger app is demoed without using TCA and its just fine but I am not quite sure what to do to drive modal sheets using the API provided by SwiftUINavigation in an app modeled with TCA. So for example, to create a simple sheet that pops up when a button is tapped I modelled a State which had a destination variable shown below, then used that to drive the navigation but I am just not sure how to derive the destination binding for the unwrapping: argument. here is a piece of code to explain what I'm thinking. Thanks for your help.
Then in the view
Beta Was this translation helpful? Give feedback.
All reactions