The documentation does not seem to state that the v-play navigation infrastructure will lazy-load pages. This is rather surprising for someone who’s used to standard QML, which will construct all components defined in the QML source at startup, unless they are wrapped in a Component{}. This leads to unexpected behavior such as getting a “ReferenceError: listPage is not defined” error from something like this:
App {
Component.onCompleted: console.log(listPage.x)
Navigation {
NavigationItem {
id: widgetsItem
title: "Widgets"
icon: IconType.calculator
WidgetsPage { title: widgetsItem.title }
}
NavigationItem {
title: "Simple List"
icon: IconType.list
NavigationStack { //this tab/navigation item uses stack-based sub-navigation
SimpleListPage { id: listPage }
}
}
}
}
This behavior should be documented in the Navigation and NavigationItem detailed description sections.