Live data from Hacker News

Write PHP Code Within Next.js Components

github.com

41–50 of 107 posts

Re: Write PHP Code Within Next.js Components

#41
post #39

Earlier quoted context omitted.

I know. The Next.js part should definitely be removed first. /s

The JS part should be removed first. No sarcasm... :)

Who would win?

A literal trillion dollar ecosystem ...

vs.

... le edgy joke.

Re: Write PHP Code Within Next.js Components

#43
For those not in on the origin of the joke, Next.js introduced "server actions" which became a huge meme / debate topic on Twitter - for example, https://twitter.com/peer_rich/status/1717609270475194466

This is presumably inspired by all of the people saying Next is turning into PHP.

Re: Write PHP Code Within Next.js Components

#44
post #40

Earlier quoted context omitted.

Very true, but React is extensively used for landing pages and e-commerce where SEO is vital. If you’re using Next for those sort of apps in your company, why not use it for the dashboard? It’s seems like the natural progression instead of running Vite on internal apps and Next on external ones.

Yea I disagree. You’ll be fighting nextjs the entire time. It’s a tool for e-commerce sites. And honestly at this point you’d be better served with Astro.

Can you elaborate on why Astro is better or what type of fight with Next? Your type of post with strong opinions but none of the underlying _reasons_ are one of the reasons why JS framework wars are tiring. I'm really interested in alternatives to Next, but it's difficult to good, non-vitriolic, shop talk.

We bolted Next onto the React/Python application at work for SEO stuff. There's a number of self-inflicted problems with our integration but Next seems serviceable. Vercel's direction as a whole is not aligned with our needs though. The framework and paradigm churn is a huge time suck.

Re: Write PHP Code Within Next.js Components

#45
post #43

For those not in on the origin of the joke, Next.js introduced "server actions" which became a huge meme / debate topic on Twitter - for example, https://twitter.com/peer_rich/status/1717609270475194466 This is presumably inspired by all of the people saying Next is turning into PHP.

Next has always been inspired by PHP. in his keynote Rauchg even spent like a moment of silence dedicated to the PHP Lambo, completely out of context. it must have been confusing to others not in on the joke but for those of us in the audience it was great

Re: Write PHP Code Within Next.js Components

#46
My favorite part about this debate is that this is how Rails works, but Rails is worse. You intersperse raw database calls with your template code (`user.first_name`), and your templates kick off an untrackable amount of queries, and when you start nesting templates, you've lost all hope of app optimization.

RSC looks like it has some great potential. I really enjoy seeing these miss-the-point trolls that overlook existing technology issues.

Re: Write PHP Code Within Next.js Components

#47
post #45
post #43

For those not in on the origin of the joke, Next.js introduced "server actions" which became a huge meme / debate topic on Twitter - for example, https://twitter.com/peer_rich/status/1717609270475194466 This is presumably inspired by all of the people saying Next is turning into PHP.

Next has always been inspired by PHP. in his keynote Rauchg even spent like a moment of silence dedicated to the PHP Lambo, completely out of context. it must have been confusing to others not in on the joke but for those of us in the audience it was great

for anyone interested i made a video about the project where this the lambo part is featured in https://youtu.be/EGOkjmyfL6E?si=gn9LQ87gBRs9q9tL&t=60

Re: Write PHP Code Within Next.js Components

#48

It's funny, but all you see here and on Twitter are cheap shot one liners, many of these people have never even used Next.js. I find server actions combined with RSC to be incredibly useful and powerful. Easily define and call a type safe function from client to server with zero overhead. No API boilerplate, fetch, tRPC anything.. You just define a function and call it, very nice. Type safety, code completion, refact…

I'm entertained by the trolling, it reminds me of when React first launched, to see who was yelling the loudest about React violating separations of concerns, and totally missing the point, just jumping on the bandwagon. It feels like a similar thing this time around. It's fun to keep tabs on who misses the point.

Re: Write PHP Code Within Next.js Components

#49
post #40

Earlier quoted context omitted.

Yea I disagree. You’ll be fighting nextjs the entire time. It’s a tool for e-commerce sites. And honestly at this point you’d be better served with Astro.

Can you elaborate on why Astro is better or what type of fight with Next? Your type of post with strong opinions but none of the underlying _reasons_ are one of the reasons why JS framework wars are tiring. I'm really interested in alternatives to Next, but it's difficult to good, non-vitriolic, shop talk. We bolted Next onto the React/Python application at work for SEO stuff. There's a number of self-inflicted probl…

What direction would you prefer Vercel went in?

Re: Write PHP Code Within Next.js Components

#50
post #18

Earlier quoted context omitted.

They're really cool, and act like the best parts of PHP. I actually miss the simply powerful aspect of the paradigm.

What part of php? php doesnt render on the client, and most php apps except for livewire don't integrate call backs to the server.

"act like" here meaning DX, not actual behavior. Magical actions within UI code.
Post reply on HN