zepp-os-navigation-lifecycle
Installation
SKILL.md
Zepp OS Navigation & Lifecycle
Context: Device App (Mini Program). Watchfaces have no pages — see
zepp-os-watchface. API_LEVEL: 2.0+. Prereq: registering pages inapp.json— seezepp-os-fundamentals.
Overview
A Mini Program is App() + one or more Page() instances. You move between pages with @zos/router and hook behavior into the lifecycle. There is no virtual DOM — build() draws the UI imperatively (see zepp-os-ui).
Lifecycle order
App onCreate(params) // init globalData; NO UI yet (page not loaded)
→ Page onInit(params) // params from push/replace (a string)
→ Page build() // draw widgets here
→ Page onDestroy()
App onDestroy()