Hacker News
points by post-it 4 days ago | 0 comments
We use nextjs at work and I hate it. Why write each view once when you could write it twice?

I'm open to the idea that we're doing it wrong and that there's a correct and pleasant way to write nextjs, but I think with the tools available today, everyone should just profile and optimize their app so they don't need to render it serverside.

[–] chrisweekly 4 days ago
I recommend ditching Next.js in favor of Tanstack Start^1, an alternative metaframework that gives you more freedom, better DX, and better defaults. Stick w the best aspects of SPAs and introduce SSR selectively if and when it makes sense.

1. https://tanstack.com/blog/tanstack-start-1-0

[–] cpursley 4 days ago
Or for a serious stack like Phoenix Liveview.
[–] agos 4 days ago
Liveview is neat, but it still has quite some raw edges - and it’s not really meant for SSG which is the topic at hand
[–] cpursley 4 days ago
So Astro, then. I was was replying to the previous poster who did need a real app.
[–] chrisweekly 3 days ago
I'd love to hear your ideas about what makes TanStack Start less "serious" than Astro
[–] cpursley 3 days ago
Tanstack vs Phoenix, not Astro. Astro is for static sites. JavaScript is not a serious backend language, but Tanstack SPA isn’t half bad.
[–] chrisweekly 4 days ago
I'd be grateful if whoever downvoted my comment could explain what they found objectionable.
[–] littlecranky67 4 days ago
Didn't downvote, but my thought on your comment is: "More freedom" -> "More decision paralysis & anxiety", "New better framework X" -> "Latest hypecycle that will be require me to rewrite and relearn a framework that is deprecated in 18 months" etc.
[–] chrisweekly 3 days ago
Yeah, that's what I figured too. Sadly, that shallow / kneejerk response leads to unearned mindshare advantage for problematic incumbents like Next.js, and risks stifling meaningful improvement.

TanStack Start absolutely merits a closer look. It's not a flash in the pan or "the new shiny". It's the robust, coherent, independent and logical evolution of battle-hardened wisdom and brilliant design and implementation from first principles. See TanStack Router and TanStack Query for more evidence and background context. I've been around the block (25+ years in webdev) and gained a deep appreciation for Tanner's way of thinking. No affiliation, just a grateful user trying to help others notice by amplifying the signal in the noise.

P.S. Yes I wrote ~"it's not X, it's Y". No I didn't use genAI to write here (nor anywhere, ever).

[–] tengbretson 4 days ago
Why are you writing the same view twice?
[–] post-it 3 days ago
Once for SSR, once for client-side; for each entry view.
[–] Pedro_Ribeiro 3 days ago
I think you're holding it wrong. I've never heard anyone doing this. Why?
[–] post-it 3 days ago
I'm not sure, I just inherited it. But there's some things like analytics that can only really run in the browser so that might be why.