Navigation
UseNav
A handle for pushing and popping views within the enclosing NavStack.
UseNav returns the *Nav handle for the nearest enclosing NavStack.
Called outside a NavStack, it returns a no-op handle so you do not have
to nil-check.
Nav methods
Pushappends a view to the stack; that view becomes the active screen.Popremoves the top entry. If only the root is on the stack,Popis a no-op.PopToRootremoves everything above the root.Replaceswaps the top of the stack in place, without animating a push.CanPopreturns true whenever there is more than one view on the stack.Depthreturns the number of views currently on the stack.
Example
Threading
Push, Pop, Replace, and PopToRoot take an internal lock and then
update a StateValue[[]View]; they are safe to call from any goroutine.