rememberNavigationEventState
Source set: Common
@Composable
public fun <T : Any> rememberNavigationEventState(
sceneState: SceneState<T>
): NavigationEventState<SceneInfo<T>>
Remembers and returns a NavigationEventState instance for a SceneState.
This composable creates and remembers a NavigationEventState object, which holds a NavigationEventHandler internally. This is the state object that can be passed to NavigationBackHandler (the composable) to "hoist" the state.
The state's handler info (currentInfo and backInfo) is kept in sync with the provided sceneState.
Parameters
| T | the type of the key in the SceneState. |
| sceneState | the SceneState that this state will track. |
Returns
a stable, remembered NavigationEventState instance. |