> For the complete documentation index, see [llms.txt](https://beyondeye.gitbook.io/compose-bloc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://beyondeye.gitbook.io/compose-bloc/differences-from-adrielcafe-voyager.md).

# Differences from adrielcafe/voyager

* The original voyager library does not support Compose Web
* The original voyager library does not support path-based navigation.
* `voyager-androidx` now work differently: all lifecycle handling hooks from the original code have been removed (`AndroidScreenLifecycleOwner` is not used anymore). This is because it caused many issues: see for example [issue 62](https://github.com/adrielcafe/voyager/issues/62). But this does not mean that android lifecycle events are ignored. When an activity is destroyed then all associated `ScreenModels` and `Blocs` are automatically disposed and the associated flows cancelled
* Also flows associated to blocs of an `Activity` are automatically paused when the `Activity` is paused
* Now Screen lifecycle is handled in the following way: A `Screen` (and associated screen model and blocs) is disposed in the following cases

  * When the `Screen` is popped from the navigator stack
  * When the parent `Activity` where the `Screen` composable was started is destroyed

  In order to all this to work, now is required to declare the top level navigator in an activity with `RootNavigator`:

```kotlin
class MainScreen: Screen {
    @Composable
        override fun Content() {
            //... main screen implementation here
        }
}

class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            //*IMPORTANT* need to use RootNavigator to initialize root navigator for activity, not as in original voyager
            RootNavigator(MainScreen())
        }
    }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://beyondeye.gitbook.io/compose-bloc/differences-from-adrielcafe-voyager.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
