NavigationBackport
NavigationBackport copied to clipboard
Adds NBNavigationLinkViewModifier to allow programmatic triggering of the navigate action.
Purpose
In use cases where we would normally like to use the NBNavigationLink, but need to trigger the same navigation action programmatically, based on a changing state variable, instead of with a button press.
E.g. I found this useful for a few cases where there is an HTML web view embedded in app, and I needed to intercept links being tapped, to trigger onward navigation.
Thanks for this PR @gsp100677! This is a similar request to #21. I've created a PR #23 that should fit this use case, albeit with a different approach than your proposed one.
Closing as #23 allows this use case albeit in a different manner.
Ah I see what you've done - thanks! Your PR should work for me just as well!