jargon

Frontend & browser·State, data and re-rendering

you stored the filtered list in state as well as the raw list, and now they need keeping in sync.

Derived state

Also calledcomputed state, derived value

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.

Commonly confused with