最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - What is "Dirty" in React.js? - Stack Overflow

programmeradmin3浏览0评论

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.

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.

Share Improve this question edited May 23, 2017 at 11:54 CommunityBot 11 silver badge asked Feb 8, 2016 at 4:53 brkbrk 50.3k10 gold badges58 silver badges82 bronze badges 1
  • 7 For people who don't like React, the whole thing is dirty... ;) – nnnnnn Commented Feb 8, 2016 at 6:08
Add a comment  | 

2 Answers 2

Reset to default 12

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.

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.

发布评论

评论列表(0)

  1. 暂无评论