A strange glitch with trying to programmatically pop a NavigationLinkStore
#1996
oliverfoggin
started this conversation in
Beta
Replies: 1 comment 1 reply
-
I think you may be butting heads with general SwiftUI bugs. The old |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I initially had an issue with
NavigationLinkStore
as I was observing too much information. I feel like I am now observing the right data but I'm unsure.I have been working to pare that back and think I have done it but now I've encountered another issue.
I've managed to replicate it again in a small project and have a video.
At the "Start" of the app I have a
NavigationLinkStore
to "Go to level 1 >". This creates state for the next level and theNLS
pushes the next view on.Then on each subsequent "level" I have two buttons. One to go to the next level, and one to pop back.
If I pop back at the first level it works. But after that it fails. It nils out the state but the pop doesn't happen. The pop happens by the parent picking it up and nilling out the state.
It is a contrived example but it is representative of what is happening in my own app too.
Here is the view and reducer
Here is a video of what I am seeing.
Screen.Recording.2023-03-22.at.19.04.32.mov
As you can see I can pop back from "Level 1" to the start. But if I try to pop back from anything beyond the first level it doesn't pop even though the state is nilled out.
Beta Was this translation helpful? Give feedback.
All reactions