Hacker News new | past | comments | ask | show | jobs | submit login

Next.js is really bad, IMO and perpetuates more bad practices.

Both Target.com and Walmart.com are Next.js apps.

Both utilize SSR to render the pages (view the markup in the network tab).

Both then STILL send the full data model to the UI (check the `__NEXT_DATA__` on Walmart.com and `__TGT_DATA__` on Target.com) because Next.js doesn't quite offer the right amount of control over what to send back (compare this to Astro.js, which does offer control over which data is needed for the client-side binding).

Next.js handling of images is ugly. It creates tag soup for responsive images instead of using native HTML and CSS capabilities (again, compare it to Astro.js and it's night and day).

Their stunt and exaggerated numbers with Turbopack further contributes to fracturing the front-end community and introduces Yet Another Tool instead of plugging into Vite.




> Both then STILL send the full data model to the UI (check the __NEXT_DATA__ on Walmart.com and __TGT_DATA__ on Target.com) because Next.js doesn't quite offer the right amount of control over what to send back (compare this to Astro.js, which does offer control over which data is needed for the client-side binding).

Those two particular customers use `getInitialProps` which allows them to respond which exactly the data they need to render those pages. Can you tell me more about what other capabilities you'd like to see there?

You'll also want to check out our work into React Server Components (https://nextjs.org/blog/next-13#server-components) which addresses both data payload size and bundle size.

> Next.js handling of images is ugly. It creates tag soup for responsive images instead of using native HTML and CSS capabilities (again, compare it to Astro.js and it's night and day).

Have you seen our updated image component? It's just an `<img>` tag, it uses all the native browser capabilities, and doesn't depend on React hydration (it even works with JS off!). Here's a demo[1] and here are the details[2].

> Their stunt and exaggerated numbers with Turbopack further contributes to fracturing the front-end community and introduces Yet Another Tool instead of plugging into Vite.

We've been working really closely with Evan You from Vite to present the data in the most clear way possible. Next time we'll make sure that any project we reference has a chance to submit feedback before we publish. We also contribute to SWC which Vite 4 has shipped plugins for[3]. We're quite confident Turbopack will continue to have a positive impact in the ecosystem.

[1] https://image-component.nextjs.gallery/placeholder

[2] https://nextjs.org/blog/next-13#nextimage

[3] https://vitejs.dev/blog/announcing-vite4.html#new-react-plug...


Is getInitialProps still incompatible with hooks? Does Next.js have a functional way of doing that now?


I don't understand the "right amount of control" bit, there are plenty of options to control what data moves to and fro in NextJS, but the CEO of Vercel has replied to you in a sibling comment; he's going to be able to address your technical concerns better than me.

I'll just add that I'm not familiar with either of those sites, because I'm sitting in Spain and neither operate here, but on first inspection the UX has felt brilliant to me - particularly Walmart's. Everything loads very fast, the search is great, etc. I cannot say if their code or eng practices are a tire fire but the product looks good to me.


> I don't understand the "right amount of control" bit

Try Astro.js and you'll understand. If the data has been used to SSR and has no function on the client side, don't send it to the client.

If two multi-billion dollar, multi-national corporations with multi-million dollar project teams can't get it right in a space where every ms counts, then the average team has no hope.


What you ask for is now possible using Next.js and the new React Server Side components. Check the link in the sibling comment tree.


That's definitely what RSC accomplishes, which I mentioned in my comment.


Also, its implementation details include monsters like monkey patching native fetch which lost me insane amounts of money and time to be found (file uploads with more than 15 kb of data broke everything).

next is nothing more than yet another bloated collage of poor ideas with poor execution, but they have marketing going for them.


Next.js also get into many of my govt's websites. It's the worst in any direction. I can explain why with bullets but so tired of these repetitive well-known reasons already.


Next.js is really easy for developers of all levels to work with though. It’s main benefit is the ease of use, not the optimized client side data transfer.

What I see from Astro.js is a lot of magic. This is great if it works, but chances are it won’t for a lot of people.


Did you try Qt and QML for creating a GUI? It's soo much easier on the brain its not even funny.


A long time ago. It was so painful I resolved to never do the same thing again.

Presumably things have changed in the meantime, but I just don’t see the point any more. Web has won and my experience is there already anyway.


If those are the only complaints you have about Next then they’re doing great.


Those are on top of why React is not the way.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: