Live data from Hacker News

Next.js 10.2

nextjs.org

31–40 of 61 posts

Re: Next.js 10.2

#31
post #21
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!

It would be great if you guys can take another look at https://github.com/vercel/next.js/issues/18318 , lots of folks seem affected by it. Basically, there is no way to produce a truly static / SSR ( `next export`) build with i18n; this means one cannot host a multi-language site on a free hosting solution like GitHub pages.

Thanks for the feedback! Next.js' i18n support adds a routing and language detection layer, which can't be easily replicated with `next export`. We're open to contributions for this, but it is a difficult problem to solve. Feel free to leave implementation suggestions on that issue.

Re: Next.js 10.2

#33
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…

It's not really about the user spying though, it's about the decision of making the user default of "yes, please track my usage so you can make your product better". I would rather have you ask the question first even though I mostly say yes, but transparency is key here.

Re: Next.js 10.2

#34
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, thank you for all your work! Big company here in Portland, and we just went all in on Next.js – so far our development speed has increased, and junior devs are easily onboarded. One request would be an official state management extension – coming from Vue and Vuex, this is something I miss. We're currently using Redux Toolkit, but would be great to have something official for Next along the lines of Vuex, Re…

Hey! Thanks for the kind words and glad you're enjoying Next.js. It's (basically) impossible for us to recommend a _single_ state management solution for all users, because state management means different things to different folks. Depending the industry and scale of your application, it also changes your state management needs.

I wrote an in-depth guide on this here: https://leerob.io/blog/react-state-management

Re: Next.js 10.2

#35

Earlier quoted context omitted.

Hey Lee, thank you for all your work! Big company here in Portland, and we just went all in on Next.js – so far our development speed has increased, and junior devs are easily onboarded. One request would be an official state management extension – coming from Vue and Vuex, this is something I miss. We're currently using Redux Toolkit, but would be great to have something official for Next along the lines of Vuex, Re…

Vercel has a library for state management that's similar to React Query. https://swr.vercel.app/ .

Note this is specifically for server caching state: https://leerob.io/blog/react-state-management

Re: Next.js 10.2

#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

Re: Next.js 10.2

#37
post #8
post #4

It claims 60% faster subsequent builds (63% for Scale), but how much can an ordinary side-project gain? (let's say, 100 component files?)

I run a pretty complex web app and haven't upgraded to webpack 5 yet with Next. I have some custom webpack stuff so hopefully the migration isn't too painful, but I will report back with the compilation time improvement once done.

Support for webpack 5 has been a multi-month rollout ensuring backwards compatibility. If you do run into issues, please add a reproduction here and we will investigate!

https://github.com/vercel/next.js/discussions/23498

Re: Next.js 10.2

#38

Cookie based redirects will be super nice for my team and I. We’ve been doing those with useEffect with firebase auth for a bit which didn’t perform badly but could perform better, and now it will!

Awesome! If you use it and have any feedback, let us know :)

Re: Next.js 10.2

#39

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've been using Render (build by some Dev Ops engineers from Stripe) https://render.com/

Static hosting is free. Servers or DB's start at $7

Re: Next.js 10.2

#40
Can someone explain these frameworks to me? Is Next.js and Gatsby in the same scope? I know they use React under the hood, but are the components rendered server-side? Does that mean no JS is delivered to the client?
Post reply on HN