Is there a way to use the `animate*AsState` functi...
# compose
m
Is there a way to use the
animate*AsState
functions for other compose backends or would I need to reimplement the entire animation library?
j
Reimplement
Had to do it for Mosaic
It's funny I would call that a frontend where Compose is the backend, but I guess it's all a matter of perspective
m
I see, I'll have to take a look at Mosaic again then. Also, thanks a lot for making Mosaic, it's been an invaluable resource when I was learning to implement my own Compose backend 😄
r
Kilua animation module also reimplements
animate*AsState
using external animation engine for JS (Motion). You can check https://github.com/rjaros/kilua/blob/main/modules/kilua-animation/src/commonMain/kotlin/dev/kilua/animation/AnimateAsState.kt
r
What is a "Compose backend"?
j
Compose does two things: manages state and builds trees.
What the tree turns into is up to you
Compose UI renders a UI toolkit
Glance creates RemoteViews
Mosaic renders to a mono space text grid
s
Reading this https://jakewharton.com/a-jetpack-compose-by-any-other-name/ is probably a good idea since you're curious Ryan
j
I think it's more the frontend of Compose
It's the actual, perceivable output of your composition
The state is basically internal, except for Molecule which makes the state the actual output and has no tree
r
Ah yes, very familiar with the concept. But TIL the term "Compose backend". I usually say something like, "providing state using the Compose runtime" and then link to your article above @jw 😆 "Compose backend" is much more succinct. Will spread the word ✉️