3 ms·
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 fel
by thesandlord 5y ago
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
- dbbk 5y agoReally? 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).
- dfabulich 5y ago"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…?
- jamil7 5y agoI’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.
- dbbk 5y agoIn 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.
- ranza 5y agoWell 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 />}
- tablef 5y agoDo you have any public project template repos?
- gherkinnn 5y agoThe 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.
- thesandlord 5y agoYeah, you have to follow their design pattern / scaffolding very closely. The tradeoff is less flexibility for faster dev cycles.
- steve_adams_86 5y agoLikewise, 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.