From 802c27aceae31915a469bf91b7ffbb7a4bb18903 Mon Sep 17 00:00:00 2001 From: Arkadii Ivanov Date: Sun, 11 Feb 2024 10:58:51 +0000 Subject: [PATCH] Updated navigation-compose-component.md --- docs/tips-tricks/navigation-compose-component.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/tips-tricks/navigation-compose-component.md b/docs/tips-tricks/navigation-compose-component.md index 58f8b2b26..97a656b6d 100644 --- a/docs/tips-tricks/navigation-compose-component.md +++ b/docs/tips-tricks/navigation-compose-component.md @@ -2,6 +2,10 @@ This section may be useful when migrating from the official [navigation-compose](https://developer.android.com/jetpack/compose/navigation) library to Decompose. We can convert screens to Decompose gradually (one by one), keeping the navigation untouched until every screen is converted. This section describes how we can host a Decompose component (or a tree of components) in a `Composable` screen managed by `navigation-compose` library. +!!!note + + This section implies minimum Decompose version `3.0.0-alpha06`. + !!!warning The `navigation-compose` library provides only two scopes for a screen: the `Composable` function of the scren and the `ViewModel` scope. There is no such a scope that is also destroyed on configuration change. So the only scope where we can host Decompose components is the `ViewModel` scope. This means we should take extra care to not leak any objects (e.g. don't pass `NavController` into component).