3 ms·
This looks ok, but generally I'd much rather just use the Next.js model of something like `getInitialProps`, which is then passed to the component. This general
by byhemechi 6y ago
This looks ok, but generally I'd much rather just use the Next.js model of something like `getInitialProps`, which is then passed to the component. This generally avoids the "waterfall" issue, and separates data and render code.
- danabramov 6y agoThis model still lets you do that, but we've found that composition does become important at some point — where parts of your page conceptually become like individual pages.
- eyelidlessness 6y agoWhat I’m looking forward to is the integration of Server Components with Next.js SSG, where I can in theory build my whole site in JSX and generate the vast majority of it statically (Next already does this part) but only send/render the small portion that’s interactive to the browser (this has been discussed elsewhere, including in Next’s issue tracker, as “partial hydration” and is currently only possible with quite a bit of hacky effort, and I don’t think any of the existing reference implementations reduce bundle size).