TimeCapsuleEffect
Records owner's state history for as long as this composable stays in composition, and exposes it to the TimeCapsule module for inspection and restore.
Call this once per screen, inside the screen's top-level composable. The recorded history is scoped to this composition: navigating away from the screen disposes it, and the timeline starts empty the next time the screen is composed.
Restoring a state is the integrator's risk — DevView does not guarantee the host app keeps working correctly after TimeCapsuleOwner.restoreState is invoked out of band.
Usage
@Composable
fun CounterScreen(viewModel: CounterViewModel) {
TimeCapsuleEffect(owner = viewModel)
// ...screen content
}Parameters
The screen's state holder, typically a ViewModel.
Produces the one-line description shown for each recorded entry. Defaults to state.toString().
Maximum number of retained entries; the oldest is dropped once reached.