Hey! Just started using decompose. Trying to use i...
# decompose
r
Hey! Just started using decompose. Trying to use it with the experimental compose api for wasm currently, specifically using the jetbrains compose extensions with it, but I can't find a JS/IR build for the jetbrains extension. Is there anything I am missing or is that a non-trivial thing to support and hasn't been worked on yet (given its experimental nature)?
a
Decompose doesn't support Wasm yet. I couldn't try if we can add experimental support. Could you please file an issue?
r
Sure, I'll make sure to do so asap
a
I tried adding JS canvas support for JS. While it is actually possible, I find it pretty unstable. E.g. the compiler crashes on some statements that are compiled just fine for all other targets (including iOS). Also there are runtime crashes on some specific cases, e.g. when you implement an anonymous class with a Composable function. Also scrolling seems not working. Do you really want to use Wasm in its current state? Or is it more as a playground?
Even Compose for iOS feels much more stable compared to Compose for JS Canvas. 🙂
a
now thats saying something lol
r
Mostly playing around, appreciate the info though, sounds like I'll check back for proper development with decompose when it's just a tad more stable
a
Sure! Adding JS support to
extensions-compose-jetpack
module is trivial, even though it requires some implementation changes due to compiler and runtime crashes. Btw, the core
decompose
module already supports JS and can be used with Compose for JS canvas. What is missing is JS support in the
extensions-compose-jetpack
module, which contains the Children function responsible for switching screens and preserving the UI state. Depending on your needs, perhaps you could just copy the implementation to your project! If you strip all the animation APIs, it would be around 100-200 LOCs.
r
Yeah that works, will give me enough to mess around and test. Thanks!