Does anyone know if there’s an “official” or recom...
# compose
j
Does anyone know if there’s an “official” or recommended solution for providing immutable lists to composables? https://github.com/Kotlin/kotlinx.collections.immutable looks pretty unmaintained atm. I’m currently looking at just boxing lists in an
@stable data class
and ensuring that I’m handling the list data appropriately in my logic, but does anyone know of a solid alternative solution, ideally one that makes dealing with immutable data more efficient than copying lists around?
s
That is the official way to do it. What feels unmaintained to you?
j
it’s alpha, and hasn’t been updated in over a year
most recent open issue was created in 2019
if it wasn’t for the github account I’d assume it was dead.
2 years ago “no, thinking about 1.0 release”
c
Do note that the Compose source code uses
kotlinx.collections.immutable
under the hood.
c
As long as Multiplattform is not final, all dependent libraries cannot be final.
c
And to be fair, the sentence before the "thinking about 1.0 release" also says a lot:
No. Its implementations are more or less stable, reported bugs and improvements (e.g.: #94, #90, #98) are fixed on a regular basis.
c
Also there are some open “questions” related to the api in here https://github.com/Kotlin/kotlinx.collections.immutable/blob/master/proposal.md
j
hmm, ok, thanks for the other perspectives.