Alternative to 'router.push' since it doesn't support nested objects in the query parameter #13362
-
Hi. I recently asked a question on how to send data between pages in NextJS. It was suggested to use router.push, and at the time, it worked. However, I noticed that one of my query parameters actually has nested objects, and if I use router.push, it would just return an empty string for that field. I looked into it and found this: #2530 (which says NextJS does not support nested objects in query parameters). What would be an alternative to router.push for sending data between pages with nested objects? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I fixed this by un-nesting the query object before I send it through router.push. |
Beta Was this translation helpful? Give feedback.
I fixed this by un-nesting the query object before I send it through router.push.