dillon1000/react

Commit

Fix Composition Level of Components w/o Owners

This fixes a bug with components constructed with no owners, for example:

  // Both the <div> and <span> have no owners.
  React.renderComponent(<div><span /></div>, node);

They should have a composition level of 1 and their keys should be prefixed with 0 to indicate they were created without owners. However, they currently incorrectly get a composition level of 0 (which means that //their// children will have keys prefixed with 0, which is wrong).
Browse files
Changed paths1 file
First-parent comparison
M src/core/ReactCompositeComponent.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…