literally nextjs has the same thing but way more complicated to setup
@arshiagholami76113 ай бұрын
this is Qwik btw
@m126522 ай бұрын
Isn't this just a massive vulnerability waiting to happen? Could be bigger than internet Explorer 😳
@doyouwantsli96802 ай бұрын
@@m12652 yeah pretty much.
@rexfngАй бұрын
Why?
@Hacking-Kitten3 ай бұрын
or just setup cors correctly??
@yassinesafraoui3 ай бұрын
Sometimes you can't if the api doesn't allow your website in the response headers, it's what happens when web scraping and that's one of the reasons it has to be on the server
@justanaveragebalkan2 ай бұрын
That requires thinking jabascript developers don't think.
@louisant18172 ай бұрын
@@yassinesafraoui When do you ever make a POST request to something that doesn't belong to you ?
@yassinesafraoui2 ай бұрын
@@louisant1817 when doing web scraping for example
@januariopinto_3 ай бұрын
Isn't this basically use server in nextjs? 🤔
@Kampouse3 ай бұрын
no cause its ran inside of a handler and not on and server component only work without js
@cyberkrypts3 ай бұрын
@@Kampouse you can trigger server action from client components and treat them like normal async functions
@Martin-kt8sz3 ай бұрын
this architecture makes literally no sense
@aresstavropoulos9163 ай бұрын
You wouldn’t build large scale apps with this thought right? I mean server/client management would be so difficult when you don’t have clearly defined endpoints forvthe client to talk to
@82TheKnocKY3 ай бұрын
I mean with this architecture you don't need to have neatly defined endpoints
@PraiseYeezus2 ай бұрын
...what about this makes it more difficult inherently?
@aresstavropoulos9162 ай бұрын
@@PraiseYeezus If you want to change how you use endpoints on the server, are you not just screwed? Adding logging, authentication would all be difficult to integrate, and there's no one location to view your endpoints, so certain endpoints can be unneccesarily redundant
@PraiseYeezus2 ай бұрын
@@aresstavropoulos916 how would it be difficult to integrate? the code you use for logging would go into the server action. such functions are meant for POST requests like submitting to a DB directly
@landsman7373 ай бұрын
but the syntax, and readability of the code in this example is bad for me
@engageintellect3 ай бұрын
Maybe I’m just used to Sveltekit. But it makes more sense to me to create an API route that runs on the server and then fetch from the client.
@StCost3 ай бұрын
on nextjs I made single [...slug].ts API file catching any request and proxying it to real backend
@erickmoya14013 ай бұрын
Please no. Mixing everything like it doesnt matter makes it worse.
@biiiiiimm3 ай бұрын
Mhhh i am now used to next server actions, i don't really feel that it mix everything. And its much simpler, same feature at same place
@brawlrob03 ай бұрын
@@biiiiiimmserver actions are different from qwik
@rexfngАй бұрын
Mixing what together? Ajax call in the frontend by the same server. Server side would need to setup cors or whitelist you. The underlying stuff don't change. I think this demonstrate how easy it is to wrap your code to be code with your server instead of client side
@bradyfractal66532 ай бұрын
Sveltekit server files is the best model I’ve found for readability, clarity, consistency, and ease of use. This pattern here would to easily create such a spaghettified minefield in large codebase. Nice for a super small personal project though.
@m126522 ай бұрын
Agreed...
@AndrewFloatrxАй бұрын
nextjs server actions 😊
@sirkato77512 ай бұрын
Am I the only one that thinks that a template and a double server call is a bad idea?
3 ай бұрын
No sir please give up this shitty architecture , my eyes and ears are bleeding 😢
@danteDeveloperАй бұрын
Is this adding proxy somewhere in runtime?
@justanaveragebalkan2 ай бұрын
I am almost sure now that this is a meme account, trying to figure out which bad take becomes popular so it can become the next react.
@chrikke2 ай бұрын
Fuck React, me and my homies love HTMX or Sveltekit
@otis37442 ай бұрын
Power feature, a lot of junior devs are about to mess up prod with this one
@fueledbycoffee58312 күн бұрын
inlining an api call is hurting my eyes so bad
@thedelanyo3 ай бұрын
Sveltekit makes more awesome
@bereketsiyum74Ай бұрын
Server actions ?
@chacs38013 ай бұрын
Only for guys that only can JavaScript
@akshayrajput38753 ай бұрын
in svelte?
@troooooper1002 ай бұрын
I'm starting to think frontend devs are ill.. they want to write HTML CSS in JavaScript and now backend too lololol
@kcin42063 ай бұрын
oh dear god no..
@letsthinkforamoment89043 ай бұрын
What do you mean "run this on the server?"
@FirstYokai3 ай бұрын
Most of the time you don't need a framework. Pick a language and make a server side website with templates. That's so easy and fast
@hamn_n14833 ай бұрын
Qwik being Qwik
@chawkichalladia18122 ай бұрын
What are you smoking 😅
@Miles-co5xm2 ай бұрын
Best way to get your server fucked up
@MegaTeckguy3 ай бұрын
Eww
@hasithapriyasad3 ай бұрын
This make no sense
@griffin80623 ай бұрын
WHY!?!?!
@AlmightyPyro20 күн бұрын
no
@IStMl26 күн бұрын
yeah no wtf
@pythagoran3 ай бұрын
Oooh I have a better idea for a feature missing from most frameworks... _remove the framework_ 🤯
@npanuhin3 ай бұрын
Don't use frameworks, use pure JavaScript, it's much easier