Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError _this2.flipBook.getPageFlip is not a function #20

Open
raana96 opened this issue Aug 23, 2021 · 3 comments
Open

TypeError _this2.flipBook.getPageFlip is not a function #20

raana96 opened this issue Aug 23, 2021 · 3 comments

Comments

@raana96
Copy link

raana96 commented Aug 23, 2021

react-pageflip has a problem with nextjs and getPageFlip does not work.

https://stackoverflow.com/questions/68883595/typeerror-this2-flipbook-getpageflip-is-not-a-function

@HarshaDW
Copy link

Experiencing the same issue!

on version 2.0.3
react: 17.0.2

@Sanaullahbugti
Copy link

Have you guys got anything related to this or any alternative for flipbook?
I am facing same issue

@nixjke
Copy link

nixjke commented Feb 11, 2023

For function components
This work for me

const bookRef = useRef(null)

const nextButtonClick = () => {
    bookRef.current.pageFlip().flipNext()
  }

 const prevButtonClick = () => {
    bookRef.current.pageFlip().flipPrev()
  }
  
<HTMLFlipBook
  onFlip={onFlip}
  width={616}
  height={872}
  showCover={true}
  ref={bookRef}
>
// ...my render page
</HTMLFlipBook>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants