Skip to content

How to combine stack-based navigation with forEach Reducer (IdentifiedArrayOf/IdentifiedActionOf) #2945

Answered by mbrandonw
TC72 asked this question in Q&A
Discussion options

You must be logged in to vote

I've started moving over to using models like SyncUps, but I wanted to push back a bit.

There's nothing to push back on 🙂. I am merely describing how value types work in Swift, and they just do not do what you are trying to get them to do. You have two separate copies of DayFeature.State in your app. One is held in the days identified array and the other in the path stack state. Those copies of state are fully separated, and the only way to keep them in sync is by the parent listening for actions in the child in order to replay those changes to the other copies.

The way I had things was based on the Todos and VoiceMemos examples.

Not every case study is in the most pristine state. Bot…

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
1 reply
@TC72
Comment options

Comment options

You must be logged in to vote
10 replies
@TC72
Comment options

@TC72
Comment options

@TC72
Comment options

@mbrandonw
Comment options

Answer selected by TC72
@TC72
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants