BigHugger
sk Skill · maxrave-dev

derive-the-flag-dont-store-and-correct-it

A boolean that is a pure function of state already being collected gets stored as its own mutableStateOf anyway, seeded with a guess and corrected a frame later by a LaunchedEffect — so the first frame renders the guess, and later changing only the seed value does nothing once rememberSaveable has already saved the old one. Use when a UI element visibly flashes shown-then-hidden-then-shown on cold start, or when…

installs 8w
0
30-day movement
starts with the next reading
Related entries
1
Connections
0
kotlinbash
Host repository
maxrave-dev/kotlin-footguns
Host stars
541