dillon1000/react

Commit

Rename receiveProps to receiveComponent

This renames receiveProps and changes it to take the next component to copy props from instead of just the props. That is,

  component.receiveComponent(nextComponent, transaction)

instead of

  component.receiveProps(nextComponent.props, transaction)

This is a precursor to adding contexts, which will also need to get propagated just like props. This change allows ReactCompositeComponent to override `receiveProps` and do something like

  this._pendingContext = nextComponent.context;
Browse files
Changed paths6 files
First-parent comparison
M src/core/ReactComponent.js ModifiedM src/core/ReactCompositeComponent.js ModifiedM src/core/ReactDOMComponent.js ModifiedM src/core/ReactMultiChild.js ModifiedM src/core/ReactTextComponent.js ModifiedM src/core/__tests__/ReactDOMComponent-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…