Skip to content
This repository was archived by the owner on Sep 16, 2020. It is now read-only.

Commit 502e2bb

Browse files
authored
Merge pull request #292 from justinmakaila/fix/refs-update
Updated refs usage
2 parents 1dbcdbd + 1eb3de4 commit 502e2bb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ const Swipeout = createReactClass({
167167
} else {
168168
this._callOnClose();
169169
}
170-
this.refs.swipeoutContent.measure((ox, oy, width, height) => {
170+
this.swipeoutContent.measure((ox, oy, width, height) => {
171171
let buttonWidth = this.props.buttonWidth || (width / 5);
172172
this.setState({
173173
btnWidth: buttonWidth,
@@ -302,7 +302,7 @@ const Swipeout = createReactClass({
302302
},
303303

304304
_openRight: function () {
305-
this.refs.swipeoutContent.measure((ox, oy, width, height) => {
305+
this.swipeoutContent.measure((ox, oy, width, height) => {
306306
let btnWidth = this.props.buttonWidth || (width / 5);
307307

308308
this.setState({
@@ -322,7 +322,7 @@ const Swipeout = createReactClass({
322322
},
323323

324324
_openLeft: function () {
325-
this.refs.swipeoutContent.measure((ox, oy, width, height) => {
325+
this.swipeoutContent.measure((ox, oy, width, height) => {
326326
let btnWidth = this.props.buttonWidth || (width / 5);
327327

328328
this.setState({
@@ -387,7 +387,7 @@ const Swipeout = createReactClass({
387387
return (
388388
<View style={styleSwipeout}>
389389
<View
390-
ref="swipeoutContent"
390+
ref={node => this.swipeoutContent = node}
391391
style={styleContent}
392392
onLayout={this._onLayout}
393393
{...this._panResponder.panHandlers}

0 commit comments

Comments
 (0)