3 ms·
> When I write real world code, ..., I write an event handler, which changes some data and then calls the parts of the UI that need an update. That's your choi
by dvdkon 3y ago
> When I write real world code, ..., I write an event handler, which changes some data and then calls the parts of the UI that need an update.
That's your choice, and I'd argue you're creating messier code slower than someone who uses a UI framework that deals with reactivity in a principled manner. Having to synchronize the UI and data manually creates room for subtle desync errors which just can't happen in, say, Vue.
- sumuyuda 3y agoOn the flip side with reactive programming it is very easy to just connect up all the data to UI components and have a bunch of unnecessary redraws. It can encourage a set it and forget it mindset. In iOS programming, there are many articles about how easy it is to cause too many redraws with SwiftUI, leading to performance issues and a bad UX.