Skip to content
Discussion options

You must be logged in to vote

Hi @junebash, have you seen this version of fullscreenCover(store:state:action:)? It allows you to first specify a store focused on the destination domain, and then further state and action transformations that single out a case in the destination enum.

If you use that version instead of manually doing a SwitchStore inside fullscreenCover you will get the behavior you expect:

.fullScreenCover(
  store: store.scope(
    state: \.$destination,
    action: AppFeature.Action.destination
  ),
  state: /AppFeature.Destination.State.first,
  action: AppFeature.Destination.Action.first
) { firstStore in
  WithViewStore(firstStore, observe: { $0 }) { viewStore in
    Button("Next View") {
      vi…

Replies: 8 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by junebash
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #2021 on April 04, 2023 17:26.