facebook/react — pull request #1510 by syranide (2014-05-10 21:45:35+00:00)
Title: Use removeAttribute to forcefully remove properties from the DOM

Proper implementation of #1448, because now there's something factual to discuss.

The DOM now statelessly reflects the props provided to DOM components. No more `getDefaultValueForProperty` :star:. `""`, `null` and `undefined` now behave identically for properties and attributes, with `""` being an actual value and distinct from `null` and `undefined`.

As is mentioned and benchmarked in the #1448, there should be a theoretically measurable impact of this. But I dare anyone to suggest a reasonable real-life use-case where it is actually at all measurable.

If we want to push the performance of edge-browsers to the limit, we could conditionally make the default type be attribute (instead of property) as FF and Chrome perform significantly better, but they're basically an order of magnitude faster making it quite pointless (and fragile) IMHO.

Basic tests added, removed an existing test (that has been half-broken) as it no longer makes sense.

```
raw gz Compared to master @ 32b84a4c5ea32835b93a857cf00f0db86d6c755a
= = build/JSXTransformer-previous.js
= = build/JSXTransformer.js
= = build/react-previous.min.js
= = build/react-test.js
-580 -172 build/react-with-addons.js
-151 -60 build/react-with-addons.min.js
-580 -169 build/react.js
-150 -53 build/react.min.js
```