multiple times?
My worry is that doing that will not trigger a recomposition (based on the existing content set in the previous
setContent
call) but rather a full composition from scratch.
✅ 1
a
Andrey Kulikov
06/16/2021, 11:27 AM
both will work in general
🙏 1
a
Adam Powell
06/16/2021, 1:32 PM
It triggers a recomposition based on the previous state of the composition like any other mutableStateOf snapshot state change; ComposeView.setContent just sets a
mutableStateOf<@Composable () -> Unit>
to the function you pass it
Adam Powell
06/16/2021, 1:34 PM
If it's a different instance of the same function you'll get a pretty standard recomposition and probably a lot of skipping. If it's a different content function altogether then it will be composing as new content into the same composition