dillon1000/react

Commit

Fix errors in React Native children management (#9449)

* Fix errors in React Native children management

- Support using appendChild to move an existing child (Fiber does this, but we were assuming all children here were new; Yoga throws if you insert a child that already has a parent)
- Calculate beforeChildIndex after removing old child (previously, off by one when the new position is later than the old position)

* Add better children management tests for RN
Browse files
Changed paths6 files
First-parent comparison
M src/__mocks__/UIManager.js ModifiedM src/renderers/native/ReactNativeFiber.js ModifiedM src/renderers/native/__tests__/ReactNativeEvents-test.js ModifiedM src/renderers/native/__tests__/ReactNativeMount-test.js ModifiedA src/renderers/native/__tests__/__snapshots__/ReactNativeEvents-test.js.snap AddedA src/renderers/native/__tests__/__snapshots__/ReactNativeMount-test.js.snap Added
Patch

Files changed

Rendering syntax-highlighted changes…