rememberSavableTWSViewState

fun rememberSavableTWSViewState(vararg inputs: Any?, default: TWSSnippet? = null, key: String = default?.id.orEmpty()): TWSViewState

Creates a TWSView state that persists across recompositions and is saved across activity recreation. This state is remembered via a key and stored using Composes rememberSaveable to restore state after process death.

Return

A TWSViewState that retains its state across activity recreation.

Note: When using saved state, URL updates via recomposition are disabled. To load new URLs, use a TWSViewNavigator.

Parameters

inputs

A set of inputs to determine when the state should be reset.

default

A TWSSnippet containing the URL, custom HTTP headers, and modifiers for the web snippet to be rendered.

key

An optional key for saved state persistence; defaults to an auto-generated key.