|
|
|
|
|
by madhadron
1957 days ago
|
|
I mean, of course you lift the state. It's just like a database. You have a normalized model containing the state, and the GUI is a view on it. Events from the GUI trigger transactions that update the state and then every element is triggered to update itself based on the new state. That should never trigger a loop of events, because a view updating itself from the model should never trigger transactions on the database. Many complicated views have their own internal models for things like where they are scrolled, what columns are shown, or what elements of a tree are expanded. But those compound views are written so that, from the outside, they appear exactly the same as any other view. > I’d love to hear what the functional programming camp has to say about this problem It's called functional reactive programming. |
|
> a view updating itself from the model should never trigger transactions on the database
i.e. a view rendering from state/messages, should never re-emit new state/messages.