Skip to content

Commit

Permalink
Replace ref String Attribute with ref Callback Attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
NameFILIP committed Sep 15, 2016
1 parent 25a52c2 commit e33d431
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/DragDropContext.js
Expand Up @@ -41,7 +41,7 @@ export default function DragDropContext(backendOrModule) {
};

getDecoratedComponentInstance() {
return this.refs.child;
return this.child;
}

getManager() {
Expand All @@ -55,7 +55,7 @@ export default function DragDropContext(backendOrModule) {
render() {
return (
<DecoratedComponent {...this.props}
ref='child' />
ref={child => this.child = child} />
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/DragLayer.js
Expand Up @@ -42,7 +42,7 @@ export default function DragLayer(collect, options = {}) {
}

getDecoratedComponentInstance() {
return this.refs.child;
return this.child;
}

shouldComponentUpdate(nextProps, nextState) {
Expand Down Expand Up @@ -108,7 +108,7 @@ export default function DragLayer(collect, options = {}) {
return (
<DecoratedComponent {...this.props}
{...this.state}
ref='child' />
ref={child => this.child = child} />
);
}
}
Expand Down

0 comments on commit e33d431

Please sign in to comment.