Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • What is "chosen category" that you are wanting/trying to persist? Are you just trying to persist the products: productsReducer state? Please edit to clarify what the exact specific problem is. If there is an error, include the complete error message and any accompanying stacktrace. Commented Oct 7, 2024 at 16:29
  • Hi Drew, I want to persist the productsInCategory in productsSlice.js after the user chose the category in DropdownTab.js. in <Link onClick=.....>{ item }</Link>. Then, the page will be directed to Category.js with the list of products. If this page is refreshed, the products disappear and displays "The category is empty". No error information in this case. Commented Oct 8, 2024 at 11:09
  • But, I want that the products should be displayed even after refreshing the Category page. Commented Oct 8, 2024 at 11:17