Hacker News new | past | comments | ask | show | jobs | submit login

Yeah, other than the nested route thing, there doesn’t seem to be that much difference between Next and Remix when it comes to talking to a database.



Next.js has had nested routes since version 6. Not sure I see the difference in what Remix is offering?

https://nextjs.org/docs/routing/introduction#nested-routes


I don't think the nested routes mean the same thing on the NextJS page. To my knowledge, NextJS doesn't support nested routers which is really what many are after. Like in the Remix demo, there are various content areas with nested content, which would be controlled by the URL. You can create url parameters manually like /account/:tab/:id but it's kinda hacky as you have to use router.params['param-here'] to get the parameter and the handle the rendering yourself. You'd really want an account router to handle each tab in the account area, and then each tab in that area has its own nested router than can display the relevant content (based on the ID of the invoice for example).


I think what you're looking for is nested routes _and_ layouts. It's possible in Next but IMO it's not the prettiest.

https://nextjs.org/docs/basic-features/layouts#per-page-layo...




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: