Comparison
Derived statevsModel-view-viewmodel
Derived state
you stored the filtered list in state as well as the raw list, and now they need keeping in sync.
A value that can be computed from existing state and therefore should not be stored separately. Storing it turns one update into two and introduces an ordering bug the first time only one of them runs. Computing it during render is almost always cheap enough; when it genuinely is not, memoise the computation rather than storing the result.
Full entry →Model-view-viewmodel
you changed a property on the viewmodel and the label updated, and no code you wrote connected the two.
A presentation model plus declarative data binding: the view binds to properties and commands on a viewmodel, and the framework propagates changes both ways. It removes the per-field wiring that MVP requires and moves the cost into a binding layer whose failures are silent — a misspelled binding path that simply shows nothing. It requires framework support to exist at all, which is the practical difference from presentation model.
Full entry →