zsperske
10/05/2023, 7:25 PMmutableStateOf
with primitives like Int, Long, etc and it recommends “Instead, prefer to use a specialized primitive state implementation for Int
, Long
, Float
, and Double
when the state does not need to track null values and does not override the default SnapshotMutationPolicy
.”
Does anyone know what those specialized implementations are called? I found some asIntState
methods in the Compose source but those appear to be read only
Solved: mutableDoubleStateOf
etcZach Klippenstein (he/him) [MOD]
10/05/2023, 7:50 PMzsperske
10/05/2023, 7:54 PMascii
10/05/2023, 8:31 PM@see
with all of them. Just one could also be confusing.
But doesn't lint already suggest the correct change? See screenshot.zsperske
10/05/2023, 8:32 PMascii
10/05/2023, 8:32 PMzsperske
10/05/2023, 8:35 PMcurioustechizen
10/06/2023, 3:13 AMzsperske
10/06/2023, 3:15 AMascii
10/06/2023, 4:49 AMAndrew Bailey
10/06/2023, 9:23 AM