Skip to content

Commit

Permalink
Replace string ref with callback ref
Browse files Browse the repository at this point in the history
  • Loading branch information
morajabi authored Jun 12, 2017
1 parent 17b0788 commit f207383
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ const swipeOptions = {

class Page extends Component {
next() {
this.refs.reactSwipe.next();
this.reactSwipe.next();
}

prev() {
this.refs.reactSwipe.prev();
this.reactSwipe.prev();
}

render() {
Expand All @@ -47,7 +47,7 @@ class Page extends Component {
<h2>Open this page from a mobile device (real or emulated).</h2>
<h2>You can pass <a href="https://github.com/voronianski/swipe-js-iso#config-options">Swipe.js options</a> as query params.</h2>

<ReactSwipe ref="reactSwipe" className="mySwipe" swipeOptions={swipeOptions}>
<ReactSwipe ref={reactSwipe => this.reactSwipe = reactSwipe} className="mySwipe" swipeOptions={swipeOptions}>
{paneNodes}
</ReactSwipe>

Expand Down

0 comments on commit f207383

Please sign in to comment.