Hello! Mutable state is common source of bugs, spe...
# mvikotlin
a
Hello! Mutable state is common source of bugs, specially with declarative UI frameworks. I suggest to always use immutable structures, unless you are really optimizing the performance with a profiler. So yes, copy data classes and it's lists and maps. You can add an entry to an immutable map as follows:
map = map + (key to value)
☝️ 1
n
Cool trick for the map! Nice, thanks
👍 1