dillon1000/react

Commit

Fix Reconciling Components to Content

This fixes a reconciliation bug introduced by adffa9b0f4128ca4832ddd03fdeca2c9fe434689.

The new unit test case exhibits the bug. When a component that has rendered child components is updated to render inline text, we usually:

 # Unmount and remove all child components.
 # Set the new inline text content.

However, with batched child operations, we do not **remove all child components** until later. The current implementation will set the inline text content and blow away those nodes, causing a fatal when `ReactMultiChild` later tries to find and remove those nodes.

This fixes the bug by ensuring that text content changes are also enqueued.
Browse files
Changed paths5 files
First-parent comparison
M src/core/ReactMultiChild.js ModifiedM src/core/ReactMultiChildUpdateTypes.js ModifiedM src/core/ReactNativeComponent.js ModifiedM src/core/__tests__/ReactMultiChildText-test.js ModifiedM src/dom/DOMChildrenOperations.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…