Skip to content

Commit

Permalink
Remove the Mixin layer of indirection on ReactMultiChild
Browse files Browse the repository at this point in the history
As mentioned in facebook#7581 (comment) we can remove the Mixin layer of indirection as it only exports a Mixin and I find it confusing.
  • Loading branch information
vjeux committed Aug 28, 2016
1 parent 19b8ead commit 927105e
Show file tree
Hide file tree
Showing 5 changed files with 309 additions and 323 deletions.
4 changes: 2 additions & 2 deletions src/renderers/art/ReactART.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function injectAfter(parentNode, referenceNode, node) {

// ContainerMixin for components that can hold ART nodes

const ContainerMixin = assign({}, ReactMultiChild.Mixin, {
const ContainerMixin = assign({}, ReactMultiChild, {

/**
* Moves a child component to the supplied index.
Expand Down Expand Up @@ -144,7 +144,7 @@ const ContainerMixin = assign({}, ReactMultiChild.Mixin, {
* @param {?object} nextChildren.
* @param {ReactReconcileTransaction} transaction
* @internal
* @override {ReactMultiChild.Mixin.updateChildren}
* @override {ReactMultiChild.updateChildren}
*/
updateChildren: function(nextChildren, transaction, context) {
this._updateChildren(nextChildren, transaction, context);
Expand Down
2 changes: 1 addition & 1 deletion src/renderers/dom/shared/ReactDOMComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@ ReactDOMComponent.Mixin = {
Object.assign(
ReactDOMComponent.prototype,
ReactDOMComponent.Mixin,
ReactMultiChild.Mixin
ReactMultiChild
);

module.exports = ReactDOMComponent;
2 changes: 1 addition & 1 deletion src/renderers/native/ReactNativeBaseComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ ReactNativeBaseComponent.Mixin = {
*/
Object.assign(
ReactNativeBaseComponent.prototype,
ReactMultiChild.Mixin,
ReactMultiChild,
ReactNativeBaseComponent.Mixin,
NativeMethodsMixin
);
Expand Down
Loading

0 comments on commit 927105e

Please sign in to comment.