So, we’ve now cooked up a new initializer on NavigationLink
that brings it more in line with how sheets and popovers work. You just hand it a binding of an optional, and when that binding flips to something non-nil
the binding is transformed into a binding of an honest value, and that binding is handed to your destination so that it can do whatever it wants with it. It’s pretty cool that all of these seemingly disparate kinds of navigation are really just all driven off the same concept, which is optional state, or more generally enums.
However, there’s another initializer on NavigationLink
that is quite different from any of the other ones. We’ve already seen the fire-and-forget initializer, the boolean binding initializer, and then we just cooked up an optional binding initializer, but this other one takes two pieces of information: something called a “tag” and something called a “selection.”