Hi, is `rememberScrollState` supported on web? Whe...
# compose-web
g
Hi, is
rememberScrollState
supported on web? When I use the function it fails with huge logs
Untitled
Screenshot 2023-08-16 at 19.27.40.png
code is something like this. on JVM variant it works ok.
Copy code
@Composable
fun HistoryScreen() {

    val viewModel by localDI().instance<HistoryScreenViewModel>()

    val scrollState = rememberScrollState()
    val coroutineScope = rememberCoroutineScope()
    Column(
        modifier = Modifier.padding(horizontal = 16.dp)
            .verticalScroll(scrollState)
//            .onPointerEvent(PointerEventType.Scroll) {
//                coroutineScope.launch {
//                    scrollState.scrollBy(scrollAmount(it) ?: return@launch)
//                }
//            },
    ) {
        Text(viewModel.markdownText.collectAsState("").value)
    }
}
g
wow, it worked on first try
wish I asked it 1 month ago 😄
🙂 2
👍 1
o
btw, what compose version are you using? I don’t remember for sure, but I think 1.5.0-beta02 should be working w/o a workaround
<http://kotlin.incremental.js.ir|kotlin.incremental.js.ir>=false
. If not, then 1.5.0 will include the workaround on compose side anyway
g
Im using 1.5.0-beta01
let me check with 02
it works without
<http://kotlin.incremental.js.ir|kotlin.incremental.js.ir>=false
👍🏾 1
👍 1
🚀