Skip to content

Impossible to set a state that push a view then a modal or another push 🤔 #1099

Discussion options

You must be logged in to vote

Ok, I confirm that TCACoordinator is fixing my issue partly :

  1. very elegantly for the deeplinking part where I need to navigate deeply in my hierarchy using one action.
  2. But for the test/screenshot part where we need to set the initialState directly, the solution I've found is working but half satisfying.

I've added an var initialAction: CoordinatorAction? to my CoordinatorState so that I can set a special action that will do all the push/present ScreenActions needed to go where I need using the routeWithDelaysIfUnsupported effect if necessary. Then I run this action in onAppear of my CoordinatorView if not nil. It has the drawbacks to pollute my production code but at least it can be con…

Replies: 2 comments

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 FredericRuaudel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant