From e33d431e3f83981bb741aa94b1609f78c2862e33 Mon Sep 17 00:00:00 2001 From: Filip Spiridonov Date: Thu, 15 Sep 2016 12:11:33 -0700 Subject: [PATCH] Replace ref String Attribute with ref Callback Attribute --- src/DragDropContext.js | 4 ++-- src/DragLayer.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/DragDropContext.js b/src/DragDropContext.js index 2b618cfcaa..b943bf47bb 100644 --- a/src/DragDropContext.js +++ b/src/DragDropContext.js @@ -41,7 +41,7 @@ export default function DragDropContext(backendOrModule) { }; getDecoratedComponentInstance() { - return this.refs.child; + return this.child; } getManager() { @@ -55,7 +55,7 @@ export default function DragDropContext(backendOrModule) { render() { return ( + ref={child => this.child = child} /> ); } } diff --git a/src/DragLayer.js b/src/DragLayer.js index b830ad3179..f3fcb644aa 100644 --- a/src/DragLayer.js +++ b/src/DragLayer.js @@ -42,7 +42,7 @@ export default function DragLayer(collect, options = {}) { } getDecoratedComponentInstance() { - return this.refs.child; + return this.child; } shouldComponentUpdate(nextProps, nextState) { @@ -108,7 +108,7 @@ export default function DragLayer(collect, options = {}) { return ( + ref={child => this.child = child} /> ); } }