Closed chaoyebugao closed 1 year ago
I'm not sure that I correctly understand your question. Your code seems fundamentally correct, what's the possible enhancement you see?
Oh if you're asking that MauiReactor should handle two-way binding the answer is no, because in a mvu approach you should never directly modify the state. In other words, there isn't a binding one-way nor two-way here. You have just a model that describes how your app should appear based on the current state, reacts to events that in turn change state. Changing the component state usually triggers component rendering .
In
Button.Text()
, it is always two-way bound, whether reading or writing. But in Entry/Editor it doesn't exist by default, it need to implement theOnTextChanged
event, like below:Is it achievable if I'm not missing something? I suggest this.