how can I test MutableState? I cant create its ins...
# compose
b
how can I test MutableState? I cant create its instance globally. it only works inside of setContent block, but even when I do create it locally, when its called by some function which isnt annotated by @Composable it throws java.lang.IllegalStateException: Not in a frame.
a
mutableStateOf
can be called outside of a composable function. If you update to dev15 from yesterday you shouldn't see the not in a frame errors anymore; the backing system was overhauled.
1
It was previously possible to get the frames system set up yourself but kind of awkward to do so
b
ooh that sounds great I didnt know about new update. I will check it out and finally get it working