---
title: "currentBackStackEntryAsState"
description: "Gets the current navigation back stack entry as a [State]. When the given navController changes
the back stack due to a [NavController.navigate] or [NavController.popBackStack] this will
trigger a recompose and return the top entry on the back stack."
type: "composable"
---

<div class='type'>Composable Function</div>


<a id='references'></a>

<div class='sourceset sourceset-android'>Android</div>


```kotlin
@Composable
public fun NavController.currentBackStackEntryAsState(): State<NavBackStackEntry?>
```


Gets the current navigation back stack entry as a `State`. When the given navController changes
the back stack due to a `NavController.navigate` or `NavController.popBackStack` this will
trigger a recompose and return the top entry on the back stack.

#### Returns

| | |
| --- | --- |
|  | state of the current back stack entry |





