4 ms·
I think UI = f(state) can only be 100% true in immediate mode UIs? That you can literally have a pure function that takes state and user input and returns a pix
by slmjkdbtl 3y ago
I think UI = f(state) can only be 100% true in immediate mode UIs? That you can literally have a pure function that takes state and user input and returns a pixel buffer to put on screen. That seems not possible for retained mode UI, which most UI development are?
- tadfisher 3y agoYou can have an immediate-mode frontend to retained-mode state; see React, Compose, SwiftUI, etc. In this case, the retained state is an implementation detail, but the goal of the framework is to render your UI function deterministically whether it's updating or creating fresh state.