Skip to content
Discussion options

You must be logged in to vote

I didn't notice in your first code snippet, but the problem is that you are creating a whole new store from scratch to pass along to the child view:

      case .child:
        ModalWrapper {
          ChildView(store: .init(
            initialState: .init(),
            reducer: Child()
          ))
        }

That store is fully disconnected from the parent store, and so it is not surprising that it isn't picking up state changes. Typically one derives a store from the parent to hand down to the child.

It seems that either that state should not be an enum, or you should follow the steps outlined in the tutorial (in particular this section) to see how to properly drive navigation from an …

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@mlouli
Comment options

@mbrandonw
Comment options

@mlouli
Comment options

@mbrandonw
Comment options

Answer selected by mlouli
@mlouli
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