facebook/react — pull request #991 by syranide (2014-01-29 19:53:06+00:00)
Title: [POC] Use a minimal React ID for the DOM

Continuation of: https://github.com/facebook/react/pull/934

This is just a proof-of-concept, so the code is far from nice. It generates monotonic IDs prefixed with the `rootID` and store the full representation internally. It's currently a very simple implementation.

It's possible to get rid of `reactIDtoMountID`. It would also be possible to use the `mountID` as the internal ID as well and only use the concatenated ID where necessary, but even that isn't strictly necessary as the concatenated ID could be replaced with a `mountID` to `parentMountID` map (I believe would work and suffice).

If I understood @petehunt correctly, this (or with minor changes) should work for server-rendering as well, and uniqueness is guaranteed by the use of the `rootID` prefix (at least to the degree we guarantee it today).

Again, just a proof-of-concept, but I figure it's easier to get the discussion started this way. :)