dillon1000/react
Commit
Browse files Respect 'key' prop for object identity
Now when a `key` prop appears, its value is always honored. This means that in the root component or as an only child, changing key will cause remounting; in a `children` object, the `key` prop will be joined with the object key to form a two-part key. Fixes #590.
Changed paths10 files
First-parent comparisonsrc/core/ReactComponent.js ModifiedM src/core/__tests__/ReactIdentity-test.js ModifiedM src/core/__tests__/ReactMount-test.js ModifiedM src/core/__tests__/ReactMultiChild-test.js ModifiedM src/core/__tests__/ReactMultiChildReconcile-test.js ModifiedA src/core/getComponentKey.js AddedM src/core/shouldUpdateReactComponent.js ModifiedM src/utils/__tests__/ReactChildren-test.js ModifiedM src/utils/__tests__/traverseAllChildren-test.js ModifiedM src/utils/traverseAllChildren.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…