Question: <https://www.transfermarkt.de/alexander-bade/profil/spieler/31>

Is it possible to scrape the whole table in one scrape?

Answer: 
Just update the model value in the `onValueChange`. You never need an internal state, since that causes ambiguity. Just follow the "single source of truth" principle.

Use this

```
Slider(
                modifier = Modifier
                    .fillMaxWidth(),
                value = viewModel.state.value,
                onValueChange = {
                    viewModel.state.value = it
                },
            )

```

Ditch the internal variable.

No need to implement `onValueFinished`.
It will be constantly updated in the model and read in the Composable at the same time. Also, if you won't update it continuously in the model, the slider won't slide in this scenario.

On the other hand, if you are implementing something like a slider that slides continuously but only updates a specific value when the user lifts there finger off the slider, use your exact code, but just apply a `remember` to your internal variable.

```
val sliderState = remember { mutableStateOf(viewModel.state.value) }

```

Although, this is not something commonly required. If you are doing it for performance purposes, it is not required. Compose is built on top of this structure so it efficiently handles these rapid state changes.
I didn't test it, but think something like this would work if viewModel.state is a StateFlow.

```kotlin
val sliderState = viewModel.state.collectAsState()
val localState = remember { mutableStateOf(sliderState.value) }
Slider(
    modifier = Modifier
        .fillMaxWidth(),
    value = localState.value,
    onValueChangeFinished = {
        viewModel.state.value = localState.value
    },
    onValueChange = {
        localState.value = it
    }
)

```