Hi I have a screen in which I have several composables, including textField. When the text field is ...
m
Hi I have a screen in which I have several composables, including textField. When the text field is being edited my composables get recomposed even though the input in them doesn’t change and they are “restartable skippable scheme”. I have also plain Text in that screen which gets skipped in recomposition. I’m having hard time to understand, anybody?
e
Hard to know w/o snippets but check where you store & read your TextFieldValue that drives the text input.
m
The textfield value is stored in viewmodel
e
Is that viewmodel passed to a composable? annotated with
@Stable
?
m
ViewModel is injected in constructor using hilt. Marking viewmodel with @Stable doesn’t help. Do you mark every viewModel with @Stable?
e
No I’m not saying you should, I am asking if you have it like so.
m
No I do not 🙂
Can you think of any reason where skippable composables wouldn’t skip when the input is the same?
e
If thats your case then it sounds like a bug and you should report it
z
Do you have some reproducible code showcasing this issue?