Gova
Navigation

NavStack

A navigation container rooted at a given view.

func NavStack(root any) *viewNode

NavStack creates a navigation container. Its argument is the root view, a View or Viewable. Passing nil panics.

var App = gova.Define(func(s *gova.Scope) gova.View {
    return gova.NavStack(HomeView{})
})

The stack owns its own state and is not accessible from outside the enclosing NavStack subtree; to push or pop from a descendant, use UseNav.

A NavStack automatically shows a title bar above the current view. Views contribute title and toolbar content via .NavTitle and .NavToolbar (see Title and toolbar).