Next.js Discord

Discord Forum

How to implement page with list and edit form

Answered
Cape lion posted this in #help-forum
Open in Discord
Cape lionOP
The page contains a list of products, when a user clicks on a product we will update the url with the product id, then the edit form will appear.

Attached sample image

Do we use the layout for this?
Do we do the queries on the layout page for the product list?

Thank you
Answered by Cave Swallow
You can use parallel route for this case
View full answer

6 Replies

Madeiran sardinella
Hi, do you want to create an edit product page?
Cape lionOP
Hi fertp, i want to have the list with the edit form, just like the image above.

When we go to /products we have a list, but /products/1 will also have a list and the edit form
Cave Swallow
You can use parallel route for this case
Answer
Cape lionOP
Oh, let me take a look. Thanks!
There is only one answer per post