Anyone tried to use reduxkotlin on native? I keep ...
# redux
b
Anyone tried to use reduxkotlin on native? I keep getting
kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen kotlin.native.internal.Ref
when trying to createStore
p
Yes, I have. Is this used as a top level val?
b
Yes it is, the store i mean
p
Try placing the store in a class. I have used a pattern where the store is created in an
App
class. The
App
class takes platform implementations of common interfaces. An example is here: https://github.com/reduxkotlin/ReadingListSampleApp/blob/master/common/src/commonMain/kotlin/org/reduxkotlin/readinglist/common/LibraryApp.kt