dillon1000/react
Commit
Browse files 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
Changed paths2 files
First-parent comparisonsrc/core/ReactInstanceHandles.js ModifiedM src/core/__tests__/ReactInstanceHandles-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…