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

I do not agree with that assessment at all. Next.js is great for making SPAs and full web apps. I've made three (profitable) projects with Next.js and never felt like I had to fight it



Likewise, I've found it great at allowing you to embed complex logic into dumb content.

What we needed was convention to deliver static content easily without needing to build it ourselves. But we also needed it to stay out of the way of our business logic. Overall, Next has done a stellar job of that. It allows us to build the stuff that matters to us while leaving what Next is great at to Next and its maintainers.

The vercel platform has also been great for us when staging deployments. It's a little slow, but the integration and ease of use again lets us focus on our own business. I don't care to build out staging infrastructure for mostly static content. It's well within everyone's ability on this team, but it's time consuming in investment and maintenance. Recouping that cost is what Next has been great for, from end to end.


The key is being page-based. If you can use the browser and URLs as a state machine for your application, Next is excellent. Its dynamic routing is a breeze to work with.

However, if you build an application where that browser-as-state-machine doesn't hold up, you're better off somewhere else.


Yeah, you have to follow their design pattern / scaffolding very closely. The tradeoff is less flexibility for faster dev cycles.


Really? I've made multiple attempts and always get stuck as soon as you have nested layouts or routes, which dashboards nearly always do (with master/detail views for instance).


"Nested layouts" just sounds like nested React components.

React is kinda weird… you have to do subcomponents the "React way" and I think a lot of folks struggle with that; it can feel like fighting. But I don't think Next makes that any easier or harder.

I don't know what you mean by "nested routes." Routes are just URLs that map to files. You can create a directory with files, and, uh, subdirectories with files, if you want…?


In Next, every route blows away the DOM and starts over. You can’t have nested routes like you can in React Router, where say you have different layout shells for logged out / logged in views, and then master/detail views where you navigate down a hierarchical navigation.


Well you sort of can. Just have a [view].js file, where the view variable will be the component. So you can have {view === 'details' && <Details />}


I’m guessing they mean pieces of state based on urls, like which tab is active here or is a modal open or closed kind of thing.


Do you have any public project template repos?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: