<div class='sourceset sourceset-common'>Common</div>

> **Deprecated** Deprecated in favor of rememberSceneState that supports sharedTransitionScope, sceneDecoratorStrategies, and list of SceneStrategies

<h2 id="rememberscenestate-entries-scenestrategy-onback">rememberSceneState</h2>

```kotlin
@Composable
public fun <T : Any> rememberSceneState(
    entries: List<NavEntry<T>>,
    sceneStrategy: SceneStrategy<T>,
    onBack: () -> Unit,
): SceneState<T>
```

Returns a [SceneState](/jetpack-compose/androidx.navigation3/navigation3-ui/classes/SceneState) that is remembered across compositions based on the parameters.

This calculates all of the scenes and provides them in a [SceneState](/jetpack-compose/androidx.navigation3/navigation3-ui/classes/SceneState).

#### Parameters

| | |
| --- | --- |
| entries | all of the entries that are associated with this state |
| sceneStrategy | the [SceneStrategy](/jetpack-compose/androidx.navigation3/navigation3-ui/interfaces/SceneStrategy) to determine which scene to render a list of entries. |
| onBack | a callback for handling system back press. |

<hr class="docs-overload-divider">

<h2 id="rememberscenestate-entries-scenestrategies-scenedecoratorstrategies-sharedtransitionscope-onback">rememberSceneState</h2>

<div class='sourceset sourceset-common'>Common</div>

```kotlin
@Composable
public fun <T : Any> rememberSceneState(
    entries: List<NavEntry<T>>,
    sceneStrategies: List<SceneStrategy<T>>,
    sceneDecoratorStrategies: List<SceneDecoratorStrategy<T>> = emptyList(),
    sharedTransitionScope: SharedTransitionScope? = null,
    onBack: () -> Unit,
): SceneState<T>
```

Returns a [SceneState](/jetpack-compose/androidx.navigation3/navigation3-ui/classes/SceneState) that is remembered across compositions based on the parameters.

This calculates all of the scenes and provides them in a [SceneState](/jetpack-compose/androidx.navigation3/navigation3-ui/classes/SceneState).

#### Parameters

| | |
| --- | --- |
| entries | all of the entries that are associated with this state |
| sceneStrategies | the list of [SceneStrategy](/jetpack-compose/androidx.navigation3/navigation3-ui/interfaces/SceneStrategy) to determine which scene to render a list of entries. |
| sceneDecoratorStrategies | list of [SceneDecoratorStrategy](/jetpack-compose/androidx.navigation3/navigation3-ui/interfaces/SceneDecoratorStrategy) to add content to the scene. |
| sharedTransitionScope | the [SharedTransitionScope](/jetpack-compose/androidx.compose.animation/animation/composable-functions/SharedTransitionScope) needed to wrap the scene decorator. If this parameter is added, this function will require the [androidx.navigation3.ui.LocalNavAnimatedContentScope](/jetpack-compose/androidx.navigation3/navigation3-ui/properties/LocalNavAnimatedContentScope). |
| onBack | a callback for handling system back press. |