Page Lifecycle

You might say

After I change a booking and return to the list, why is the old time still there?

Callbacks triggered when a page is created, shown, hidden, or unloadedIn a mini program, opening a booking detail page can hide the list while keeping its instance. Returning shows that same list again and triggers onShow, not another onLoad. Choose refresh and cleanup timing based on those events.
onLoadonShowonHideonUnload

Send this to the AI Agent in your project

Ready to paste into Cursor, Claude Code, or Codex
Structured AI Agent prompt

After editing booking details, the list still shows the old time on return. Check the page lifecycle: is data loaded only in onLoad, and should onShow refresh it? Repeat entering details, editing, and returning twice; verify the latest booking appears without duplicate requests.

Want your Agent to translate plain-language UI ideas automatically?Install free VibeHub Skill →
Further reading