News for hackers. Stuff that matters.
Re:Next.js 11 by dbbk on Tuesday June 15, 2021 @02:05PM (#27519168)
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).
Re:Next.js 11 by dfabulich on Tuesday June 15, 2021 @02:18PM (#27519378)
"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…?

Re:Next.js 11 by dbbk on Tuesday June 15, 2021 @04:59PM (#27521411)
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.
Re:Next.js 11 by ranza on Tuesday June 15, 2021 @06:12PM (#27522201)
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 />}
Re:Next.js 11 by jamil7 on Tuesday June 15, 2021 @02:34PM (#27519593)
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.