react-paginate icon indicating copy to clipboard operation
react-paginate copied to clipboard

Hangs forever when pageCount is `Infinity`

Open gsouf opened this issue 1 month ago • 2 comments

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.

gsouf avatar May 23 '24 00:05 gsouf