A navigationDestination for <App.Entity> was declared earlier on the stack. Only the destination declared closest to the root view of the stack will be used.

anyone been able to get rid of this error?

A navigationDestination for <App.Entity> was declared earlier on the stack. Only the destination declared closest to the root view of the stack will be used.

Seems to happen when im using a NavigationLink(value:) and a NavigationLink(destination:) in the same class.

I'd think it would make sense to be able to use both methods?

ios16 b5

Answered by SpaceMan in 723320022

For value-based navigation destinations, don't put the destination modifier right after the NavigationLink. Put it after the List view or whatever your containing view is.

Accepted Answer

For value-based navigation destinations, don't put the destination modifier right after the NavigationLink. Put it after the List view or whatever your containing view is.

A navigationDestination for &lt;App.Entity&gt; was declared earlier on the stack. Only the destination declared closest to the root view of the stack will be used.
 
 
Q