# SavedStateRegistry.SavedStateRestorer

Artifact: [androidx.savedstate:savedstate](https://developer.android.com/jetpack/androidx/releases/savedstate.md.txt) [View Source](https://cs.android.com/search?q=file:androidx/savedstate/SavedStateRegistry.+class:androidx.savedstate.SavedStateRegistry.SavedStateRestorer) Added in [1.6.0-alpha05](https://developer.android.com/jetpack/androidx/releases/savedstate.md.txt#1.6.0-alpha05)

*** ** * ** ***

Common/AllAndroid/JVM
- Cmn

  ```
  fun interface SavedStateRegistry.SavedStateRestorer
  ```
Known direct subclasses [SavedStateValue](https://developer.android.com/reference/kotlin/androidx/savedstate/SavedStateValue.md.txt)

|---|---|
| `SavedStateValue` | Interface representing a saved state component holding a `value`. |

*** ** * ** ***

Restores state for a component.

Implement this interface on a `SavedStateProvider` registered via `registerSavedStateProvider` to receive restored state automatically.

The registry will invoke `restoreState` during the restoration phase or immediately upon registration if the state is already restored.

## Summary

| ### Public functions |
|---|---|---|
| `Unit` | `restoreState(savedState: Bundle?)` Called to restore the state of a component. | android |
| `Unit` | `restoreState(savedState: SavedState?)` Called to restore the state of a component. | Cmn |

## Public functions

### restoreState

android Added in [1.6.0-alpha05](https://developer.android.com/jetpack/androidx/releases/savedstate.md.txt#1.6.0-alpha05)

```
fun restoreState(savedState: Bundle?): Unit
```

Called to restore the state of a component.

| Parameters |
|---|---|
| `savedState: Bundle?` | The `SavedState` containing the previously saved state, or `null` if no state was previously saved for this component. |

### restoreState

Cmn

```
fun restoreState(savedState: SavedState?): Unit
```

Called to restore the state of a component.

| Parameters |
|---|---|
| `savedState: SavedState?` | The `SavedState` containing the previously saved state, or `null` if no state was previously saved for this component. |