johnpatrickmorgan / NavigationBackport

Backported SwiftUI navigation APIs introduced in WWDC22

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Replacing navigation path array

ilendemli opened this issue · comments

Hey!

In the readme it says that each append of a destination is delayed if necessary. If I already have a screen appended to the navigation path array, is it delayed as well when I popToRoot and immediately append a new screen?

path.popToRoot()
path.append(Destination.page)

for some reason, it does not pop to root (or replaces the current screen) in the project I am working on.

Turns out the issue was something different. The View was not updating even though the data had an id. We added .id(data.id) to the view which fixed this problem.