10 ms·
Are user triggered events for a view part of the view, or something else? I think this is where such a separation of concerns comes in... a view is more than j
by tracker1 12y ago
Are user triggered events for a view part of the view, or something else? I think this is where such a separation of concerns comes in... a view is more than just how it is rendered, it is also events for the view. There are also child components, and handling these events, or encapsulating them into events to be triggered by a given view.
When you think of it this way, it makes sense. From a designer perspective it doesn't, and you have to adapt designs into a view, just the same, you usually do anyway.
- lumpypua 12y agoI think you've got it exactly backwards. Events are not part of the view. Events happen to be triggered by the view and they affect global state which is then reflected in the view. This is the separation of concerns you want. Components don't need to know about events beyond triggering the ones they need. Components only worry about rendering state.