I'm looking at the source code of `OutlinedTextFie...
# compose
z
I'm looking at the source code of
OutlinedTextField
, in particular the case where the input
value
is of type
String
. The code is defining a mutable state called
textFieldValueState
and that's expected. But why do we need another variable -
textFieldValue
that's set as a value of the inner
OutlinedTextField
? Why are we not using
textFieldValueState
as usual?
a
Looks like it was to prevent an extra recomposition from occurring. https://android-review.googlesource.com/c/platform/frameworks/support/+/1506868
👍 1