As someone who loves PHP/Laravel/WordPress, don't tempt me. My WordPress plugin built with Next.js, integrated with Laravel, coming soon.
Write PHP Code Within Next.js Components
21–30 of 107 posts
Re: Write PHP Code Within Next.js Components
#22Every day we stray further from God's light.
Re: Write PHP Code Within Next.js Components
#23Re: Write PHP Code Within Next.js Components
#24It'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…
They're really cool, and act like the best parts of PHP. I actually miss the simply powerful aspect of the paradigm.
Re: Write PHP Code Within Next.js Components
#25> I hope I don't have to say this but: If you even in the slightest consider to use this in any application at all you are an absolute madman and and should be locked out of the internet for the rest of your life, I hope you find some other fun activity, maybe gardening or woodwork.
Re: Write PHP Code Within Next.js Components
#26It'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 just wanna add here on a serious note that i also see a use cases for "server actions", but i do not primarily write next.js or react so i didn't have an opportunity to try them out yet. I think it's important to know what you would use them for. I don't think core business logic should be there, but I see why you would use them for f.e. signing something that would require a secret you don't want to have on the cl…
Are API calls bad now? Same thing. A misunderstood example.
Re: Write PHP Code Within Next.js Components
#27> I hope I don't have to say this but: If you even in the slightest consider to use this in any application at all you are an absolute madman and and should be locked out of the internet for the rest of your life, I hope you find some other fun activity, maybe gardening or woodwork.
I know. The Next.js part should definitely be removed first. /s
Re: Write PHP Code Within Next.js Components
#28I think part of what makes these recent gags so funny to me is that it illustrates how perilous mixing RSC with client code feels in practice. Worrying about teammates accidentally exposing environment variables was already bad enough. Debugging is now even more troublesome, and for what? So we can use some XML-like syntax everywhere? React serves a purpose but this doesn't feel like it. All these directives, the loo…