From f2073830a7123be3ece15fb50426f7a5ed38c585 Mon Sep 17 00:00:00 2001 From: Mohammad Rajabifard Date: Mon, 12 Jun 2017 14:53:43 +0430 Subject: [PATCH] Replace string ref with callback ref --- demo/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/demo/index.js b/demo/index.js index 46a48a0..c7b1149 100644 --- a/demo/index.js +++ b/demo/index.js @@ -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() { @@ -47,7 +47,7 @@ class Page extends Component {

Open this page from a mobile device (real or emulated).

You can pass Swipe.js options as query params.

- + this.reactSwipe = reactSwipe} className="mySwipe" swipeOptions={swipeOptions}> {paneNodes}