15

I am trying to understand React.js and often come across a term "Dirty" like dirty checker/checking, dirty data ,dirty model

I followed this question but could not make out what actually the term Dirty convey & why we call it dirty.

Community
  • 1
  • 1
brk
  • 48,835
  • 10
  • 56
  • 78

2 Answers2

11

Dirty data - the data, that have been changed recently and DOM haven't been re-rendered according to this changes yet. So dirty checking is diff between next state and current state.

xCrZx
  • 2,503
  • 1
  • 24
  • 25
  • 6
    To be clear, "dirty-checking" isn't specific to React. It's just a term for one way of synchronizing application state to the DOM/UI. React uses something different: [reconciliation](https://facebook.github.io/react/docs/reconciliation.html). – rossipedia Feb 08 '16 at 08:02
6

Dirty is just the state of the form which tells that this form has been touched by user. This does not means that form is invalid.