1

I'm making a React application in which I make some API calls for a pagination of products. The url I'm using for showing every page in the products list is something like:

http://www.example.com/products

So my question is if it's necessary to have something like this for the page 1:

http://www.example.com/products?page=1

Something like this for the page 2 and so on..

http://www.example.com/products?page=2

  • 1
    You may wish to take a look at this thread for [React Router with optional path parameter](https://stackoverflow.com/questions/35604617/react-router-with-optional-path-parameter) for pagination instead, so you can do something like `/products`, then `/products/1` `/products/2` and so on. – metatoaster Feb 14 '20 at 02:44
  • I will take a look, thanks! – Mauricio Avendaño Feb 14 '20 at 14:45

1 Answers1

2

It's not at all necessary. It's totally up to you how you design it.

But with having this kind of link it will be easy for the user to hop in to some particular page just through the link

Anas M.I
  • 512
  • 2
  • 8