SrSouza
03/17/2023, 12:51 PMCLOVIS
03/17/2023, 1:11 PMCLOVIS
03/17/2023, 1:11 PMCanvas
composable to switch between themSrSouza
03/17/2023, 1:19 PMBox(modifer ...) {
DomInterop(...) {
DomDivComposable()
}
}
Div(...) {
CanvasInterop(..){
MaterialButton()
MultiplatformComponent()
}
}
CLOVIS
03/17/2023, 1:21 PMCanvasInterop
composable but I don't know how to.CLOVIS
03/17/2023, 1:21 PMArjan van Wieringen
03/17/2023, 1:53 PMOliver.O
03/17/2023, 9:22 PMGlobalSnapshotManager.ensureStarted(testScope)
withContext(headlessMonotonicFrameClock(fps)) {
val recomposer = Recomposer(coroutineContext)
val composition = Composition(applier, recomposer)
try {
composition.setContent {
// This is the place to insert the initial Composable
}
recomposer.runRecomposeAndApplyChanges() // <- This method will not return
// unless the Recomposer is closed and all effects in managed compositions
// complete.
} finally {
composition.dispose()
GlobalSnapshotManager.stop()
}
}
So suppose we'd use different coroutines to start up multiple Composers (which would be possible even in single-threaded environments). Then each Composer makes assumptions about how to schedule updates, and these assumptions depend on the frame clock. I'm not sure whether that works with multiple Composers unaware of each other but depending on the same frame clock.shikasd
03/19/2023, 5:52 AM