Why is there `mutableStateListOf` and `mutableStat...
# compose
j
Why is there
mutableStateListOf
and 
mutableStateMapOf
but no
mutableStateSetOf
?
1
b
I'm guessing because collections are harder to diff and as such have more tailored and optimised variants for this.
a
feel free to file a FR, answer is probably as simple as, "we haven't needed it ourselves yet"
🙏 1
z
Also you can trivially implement a set on top of a map (I believe this is actually how some of the standard JVM collections like
LinkedHashMap
do it)
a
all of the current ones are basically thin wrappers around a shaded version of kotlinx.collections.immutable collections
j
Also you can trivially implement a set on top of a map (I believe this is actually how some of the standard JVM collections like 
LinkedHashMap
 do it)
@Zach Klippenstein (he/him) [MOD] I though of that too, because the keys of a
Map
are indeed a
Set
. Though couldn’t come up with a simple way of declaring:
Copy code
val myCollection = remember { mutableStateMapOf<String, Long>() }
and then accessing
myCollection
as a
MutableSet
z
Yea you’d have to probably manually implement the interface and delegate
803 Views