darenju / react-flip-page

A React.js implementation of the Flipboard page swipe.
MIT License
173 stars 31 forks source link

onPageChange() #116

Closed steven-beard closed 5 years ago

steven-beard commented 5 years ago

Unless I have done something wrong I believe the parameters are backward.

onPageChange={(direction, index) => {
                console.log(
                  "this is direction",
                  direction + " this is index",
                  index
                );
              }}

When I change the page the console reads " this is direction 1 this is index next"

darenju commented 5 years ago

Hello, Doc and code say the same thing: it’s index then direction. You get a set direction when using gotoPage method.