Live data from Hacker News

Next.js 10.2

nextjs.org

51–60 of 61 posts

Re: Next.js 10.2

#51
post #2

Lee from Vercel here. Happy to answer any questions :) If you have any suggestions for how we can improve Next.js, let me know!

No questions.

Just wanted to say that you're doing an excellent job. Thanks!

Re: Next.js 10.2

#52
post #2

Lee from Vercel here. Happy to answer any questions :) If you have any suggestions for how we can improve Next.js, let me know!

Hey Lee, been following your work for a while.

Could you please add your vote for "getStaticProps" for individual components also. That way I can use this component in multiple pages for example to statically rendering a tweet etc. (maybe useful for your blog too :) )

I think equivalent of this feature in gatsby is staticQuery https://www.gatsbyjs.com/docs/how-to/querying-data/static-qu...

Same question I asked in r/nextjs https://www.reddit.com/r/nextjs/comments/mmqoqm/how_to_async...

related discussion https://github.com/vercel/next.js/discussions/13390

Re: Next.js 10.2

#53

Sort of Next related, but I was looking into these frameworks today and it seems all of the easy hosting services jump from free to $20 for what seems to be elaborate static hosting. Is there a middle ground for hobbyists that are running commercial software without spinning up your own VPS (Vercel doesn't look kindly on commercial on their free plan).

I use Netfliy and its Nextjs build plugin that automatically creates serverless functions for the api routes, does ssg and deploys. All under the free plan.

https://www.netlify.com/blog/2021/03/16/try-the-new-essentia...

Re: Next.js 10.2

#54
post #19

What turns me off about NextJS is its "opt-out" telemetry. You have to do a bit of magic at the system level "npx next telemetry disable" to turn it off (which you can only figure out by an internet search). This seems very disingenuous on part of Vercel. Make it an "opt-in" or don't fricking track. Conduct a yearly survey or use some other means if you are so interested in improving the framework. I am open to other…

Counter-opinion here: I am the maintainer of one of the most popular plugin for Next.js, and I am cruelly lacking data about how the users of my plugin use it, that would allow me to choose better defaults for it. I don't have access to the Next.js telemetry data, but I could definitely need to ask the Next.js team from time to time: "so, are your users more using Yarn workspaces? Or npm link? Or something else?", et…

Perhaps it would be better if there was a trusted co-op that ran a telemetry service that package maintainers could opt into and create integrations which could properly anonymize and provide open data for analytics. Similar to how npm shows the number of downloads.

Re: Next.js 10.2

#55
post #2

Lee from Vercel here. Happy to answer any questions :) If you have any suggestions for how we can improve Next.js, let me know!

This isn’t so much about 10.2, but about Next’s plans/roadmap for static sites, particularly whether there are plans to provide official support for partial hydration.

I like a lot of what Next brings in terms of DX polish. But I ultimately decided not to use it for recent projects, where the majority of the content is truly static. Next sends this content in HTML, then sends it again in JS. This not only adds unnecessary page weight, it also increases the uncanny valley before TTI.

The current solution to this in Next is to mark an entire page as non-interactive. This means a page will send either no JS at all, or all of it. This isn’t ideal.

There are several experimental projects exploring partial hydration with Next, but without official support they’re risky. There are also emerging projects like Astro providing similar functionality to Next with partial hydration as a core feature.

I’d imagine the most obvious way to achieve something similar in Next will be SSG with React Server Components, but who knows when that will be stable.

Anyway, curious if Vercel has anything to share on the topic.

Re: Next.js 10.2

#56
post #36
post #5

I recently tried using Next instead of Nuxt, but I seem to recall I couldn't export optimised images when doing a statically generated site. Has this changed, or are there any plans to change it?

You can still use `next/image` when outputting a static site, as long as you use `next start`. Using `next export` removes the server entirely, meaning you can't optimize images on demand. There's an open issue to explore optimizing images at build time, but for now, you can use https://github.com/cyrilwanner/next-optimized-images

I ran into the same issue when trying to run next export. The linked library has worked great. I wanted to simply have a srcset generated at build time. I don't know why Next Image can't support this out of the box.

Re: Next.js 10.2

#57

What turns me off about NextJS is its "opt-out" telemetry. You have to do a bit of magic at the system level "npx next telemetry disable" to turn it off (which you can only figure out by an internet search). This seems very disingenuous on part of Vercel. Make it an "opt-in" or don't fricking track. Conduct a yearly survey or use some other means if you are so interested in improving the framework. I am open to other…

How bizarre. I've never heard of a framework with built-in telemetry, much less opt-out. I'm surprised this doesn't limit its reach in certain industries. And this isn't just for their official hosting service? That would be much more understandable

It's extremely easy to disable the telemetry. Much more importantly, every time you start nextjs, half of the output is a big warning telling you exactly how to disable the telemetry.

Re: Next.js 10.2

#58
post #2

Lee from Vercel here. Happy to answer any questions :) If you have any suggestions for how we can improve Next.js, let me know!

No questions. Just wanted to say that you're doing an excellent job. Thanks!

Hey, thank you! I appreciate that.

Re: Next.js 10.2

#59
post #2

Lee from Vercel here. Happy to answer any questions :) If you have any suggestions for how we can improve Next.js, let me know!

Hey Lee, been following your work for a while. Could you please add your vote for "getStaticProps" for individual components also. That way I can use this component in multiple pages for example to statically rendering a tweet etc. (maybe useful for your blog too :) ) I think equivalent of this feature in gatsby is staticQuery https://www.gatsbyjs.com/docs/how-to/querying-data/static-qu... Same question I asked in r/…

getStaticProps for individual components will be solved with React Server Components! http://vercel.link/rsc

Re: Next.js 10.2

#60
post #2

Lee from Vercel here. Happy to answer any questions :) If you have any suggestions for how we can improve Next.js, let me know!

This isn’t so much about 10.2, but about Next’s plans/roadmap for static sites, particularly whether there are plans to provide official support for partial hydration. I like a lot of what Next brings in terms of DX polish. But I ultimately decided not to use it for recent projects, where the majority of the content is truly static. Next sends this content in HTML, then sends it again in JS. This not only adds unnece…

> I’d imagine the most obvious way to achieve something similar in Next will be SSG with React Server Components, but who knows when that will be stable.

Sooner than you might think!

Post reply on HN