# NavKey

Artifact: [androidx.navigation3:navigation3-runtime](https://developer.android.com/jetpack/androidx/releases/navigation3) [View Source](https://cs.android.com/search?q=file:androidx/navigation3/runtime/NavKey.kt+class:androidx.navigation3.runtime.NavKey) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigation3#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  interface NavKey
  ```

*** ** * ** ***

Marker interface for keys.

Objects and classes that extend this class must be marked with the `https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-core/kotlinx.serialization/-serializable/index.html` annotation in order to be saved with by the `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/rememberNavBackStack.composable#rememberNavBackStack(androidx.savedstate.serialization.SavedStateConfiguration,kotlin.Array)` function.

This class is required because `https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-core/kotlinx.serialization/-serializable/index.html` is only an annotation and does not provide a way to link classes marked with the annotation together and provide a serializable that works with all of them, resulting it making it impossible to properly save and restore.