Reputation: 19
In Next js 13 app router
In server componets search paramaters are required to navigate between Page A and Page B example: Page A url (http://localhost:3000/order-details?order-id=10) Page B url ( (http://localhost:3000/order-status)
after entering to Page A, You can navigate to Page B. The problem here is how to navigate back to Page A from Page B. Is there any way that i can store query parameters of Page A at server side. ( In client component this can be achieved using Context API or session Storage) How to do it at server side??
I have asked a question regrading next js 13 server side components and expecting answer for that
Upvotes: 1
Views: 1834
Reputation: 19
Instead of cookies. I have used Query parameters sending order-id to both the pages, so I can grab it using searchParams. Cookies will work but I have similar cases where lots of data is needed to store.
Upvotes: 0