dillon1000/react

Commit

Use `isAncestorIDOf` in `ReactInstanceHandles`

This is both a functional fix and performance fix for `ReactInstanceHandles`.

 - `getFirstReactDOM` uses `indexOf` but should be checking ancestry (via `isMarker()`).
 - Added `isAncestorIDOf`, checking ancestry can be way faster than getting a common ancestor: http://jsperf.com/react-ancestor-id-check
Browse files
Changed paths2 files
First-parent comparison
M src/core/ReactInstanceHandles.js ModifiedM src/core/__tests__/ReactInstanceHandles-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…