<https://twitter.com/intelligibabble/status/127333...
# compose
a
https://twitter.com/intelligibabble/status/1273339533891788800 This tweet referes to using compose in any tree. Does this mean it can be applicable to kotlin/jvm for desktop? or even used in kotlin/js?
s
As long as you have compiler plugin and runtime working on these platforms, it can be I experimented with something like this recently in non-android jvm and managed to get it working
a
Whooooooaaaaaaa . . . . . . . !! This opens a lot of doors
t
@shikasd you've been working on jetpack compose for WebUI with server side rendering. How much work do you think it would take to have it working with kotlin/js?
s
I'd wait for release of WeakRefs on js and kotlin 1.4, where k/js will have IR backend, then it should be easier 🙂
Otherwise, not sure about exact estimates
l
@shikasd what is it you need weak references for?
s
@Leland Richardson [G] Last time I have checked, compose used them in ObserverMap I was also thinking to replace it with WeakMap, feels kinda same mostly I was looking for IR generation for JS, and in 1.4-m2 it is still quite in progress 🙂
l
ahhh, observermap
didn’t think about that
was thinking you were thinking about the Compositions holder map which should probably go away…
cc @Chuck Jazdzewski [G] might have some thoughts. would ObserverMap in js need a WeakMap?
c
Yes. Much of
ObserverMap
is trying to work around Java allowing custom
equals
implementation and not having ephemerals so a
WeakMap
is the right
actual
for JS.
s
That's for confirming 🙂 Btw, do you have a timeline for merging compiler upstream?
l
Btw, do you have a timeline for merging compiler upstream?
Depends what you mean by this. If you mean making the compose compiler plugin part of kotlin proper, there are no plans for that currently.
If you mean when will we rebase our version of kotlin with master, the answer is as soon as we get the build to go green 🙂
and if you mean when will compose work with a proper version of kotlin… the hopeful but not certain answer for that is 1.4
s
I meant current master, but thanks for this extensive reply :)