Guia Navigation
Github
  • Overview
  • Setup
  • Using Guia
    • 📔Express Lore
      • Quick Start
    • 📖The Lore
      • Navigation Key
      • Navigation Node
        • Screen
        • Bottom Sheet
        • Dialog
      • Navigator
        • Navigation Operations
        • Navigator Instance
        • Back Handling
      • Navigator Config
        • Dynamic Navigation Node
        • Transitions
      • Containers
      • NavHost
        • Back Handling
      • Multi module navigation
        • NavHost Multi module
      • Deep Linking / Global Navigation
      • Results
      • Lifecycle, ViewModel, Saved State
      • UI Tests
  • 🤖Advanced
    • Custom LifecycleManager
Powered by GitBook
On this page
  1. Using Guia
  2. The Lore

Lifecycle, ViewModel, Saved State

Lifecycle in Guia is managed by the LifecycleManagerAPI.

It creates a LifecycleEntry for each BackstackEntry in our navigator. Each lifecycle entry has its own Lifecycle, ViewModel scope, SavedStateRegistry

The LifecycleManagerwill react to changes in the backstack and update the lifecycles of all entries accordingly. It also decides which entries are currently visible on the screen.

Nesting navigators is fine since the manager will also propagate lifecycle changes between hosts/children.

The LifecycleManager API is public you can use it to create your own UI Logic. Check ViewPager and Card Stack examples.

PreviousResultsNextUI Tests

Last updated 2 years ago

📖