Anujcodecraft/notes-online
## ð Issue: Pagination Resets to First Page on Refresh
ãªãŒãã³
#28 opened on 2025/07/04
ReactJsUIbugenhancementgood first issue
Repository metrics
- Stars
-  (7 åã®ã¹ã¿ãŒ)
- PR merge metrics
- Â (PR metrics pending)
説æ
Description
When a user navigates to Browse Notes or Browse PYQ, changes to page 2 (or any other page), and then refreshes the browser, the page resets to page 1 instead of staying on the selected page.
This breaks the expected behavior of persistent pagination and impacts user experience, especially when browsing large datasets.
â Expected Behavior
- After refreshing the page, the user should remain on the same page number they were on before the refresh (e.g., page 2).
- Pagination state should persist through browser refreshes or deep links.
𧪠Steps to Reproduce
- Go to Browse Notes or Browse PYQ of ð Live Demo.
- Click to navigate to Page 2.
- Refresh the browser.
- Observe: The user is redirected back to Page 1.
ð¡ Proposed Solution
- Use URL query parameters to store the current page number (e.g.,
?page=2). - On component mount, read the
pagequery param from the URL and set it as the current page state. - Update the query param whenever the user navigates to a new page.