The problem I am facing can be described as follows:
I am using Next.js, Redux Toolkit, and Next Redux Wrapper. I have created a Redux slice with a state variable called "counter." Additionally, I have two pages named "test-1" and "test-2."
On "test-1" page, I increased the value of the counter to 3. However, when I click on a link to navigate to the "test-2" page, the counter variable is immediately reset to its initial state.
Live demo for replicating the case.
I attempted to preserve the counter value between page transitions in Next.js using Redux Toolkit and Next Redux Wrapper. I expected the counter value to remain unchanged when navigating from "test-1" to "test-2" pages. However, the counter was reset to its initial state instead.