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

Hangs forever when pageCount is Infinity #515

Open
gsouf opened this issue May 23, 2024 · 3 comments
Open

Hangs forever when pageCount is Infinity #515

gsouf opened this issue May 23, 2024 · 3 comments

Comments

@gsouf
Copy link

gsouf commented May 23, 2024

The following code will cause the browser to hang forever:

  <ReactPaginate
    pageCount={Infinity}
   ....
  />

Most likely it falls into an endless loop.

While a user shouldn't pass infinity, it can be done by mistake and the fact that it breaks and freezes the whole UI without a notice makes it hard to figure out. For example it will happen if the user divides something 0, that javascript allows.

@NgoKnows
Copy link

I noticed with really large page counts, this component gets very slow. Were you able to find any workaround?

@gsouf
Copy link
Author

gsouf commented Jun 25, 2024

@NgoKnows the issue I mentioned about infinity is not about being slow, it's about falling into something like an endless loop and totally freezing the browser.

I haven't had to deal with large page count, so I can't really tell about it sorry

@semanticist21
Copy link

As the maintainer does not update this pkg for a long time,
I think you should manage it by yourself.

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

3 participants