Skip to content

Commit

Permalink
Update transitions docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DevSrSouza committed Jun 4, 2024
1 parent db387ca commit d7705ad
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions docs/transitions-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ setContent {
}
```

!!! error
!!! danger
There is a know bug using any Transition APIs can leaky ScreenModels or ViewModels, this happens because Voyager by default
dispose Screens in the next Composition tick after a `pop` or `replace` is called, but the transition only finish later, so
the ScreenModel or ViewModel is re created or cleared to early. For this purpose since Voyager `1.1.0-beta02` we have introduce
Expand All @@ -35,11 +35,10 @@ setContent {
!!! warning
Have encounter `Screen was used multiple times` crash? Provide a `uniqueScreenKey` for your Screens

```kotlin hl_lines="3 4"
```kotlin hl_lines="3 3"
class ScreenFoo : Screen {
override val key: ScreenKey
get() = uniqueScreenKey
override val key: ScreenKey = uniqueScreenKey

@Composable
override fun Content() {
Expand Down

0 comments on commit d7705ad

Please sign in to comment.