3 ms·
This is interesting. I've been trying to model UI flows in a "CPU-like" manner, as incremental state transformations that are committed at most once per frame.
by tadfisher 4y ago
This is interesting. I've been trying to model UI flows in a "CPU-like" manner, as incremental state transformations that are committed at most once per frame. That's the basis of some UI frameworks like Jetpack Compose, which bundle the incremental state in a global snapshot, sidestepping most of the pitfalls of mutable state by controlling when mutations are applied. What's neat about this paradigm is that you can write fairly naive code that reads and mutates state with abandon, and the snapshot mechanism lets the code just work without modeling the whole app as a state machine.