wordfor

derived state

noun

Frontend

  1. Values computed from existing state on demand instead of stored separately, so they can never drift out of sync. Compute 'unread count' from the message list instead of storing and updating a separate counter.

In plain words

  • keeping values in sync manually
  • storing the same thing twice
  • the count doesn't match the list

See also single source of truth make illegal states unrepresentable

Find similar words