5 Hidden React Server Function TRAPS Beginners Fall Into

  Рет қаралды 5,417

Jack Herrington

Jack Herrington

Күн бұрын

Пікірлер: 40
@snsa_kscc
@snsa_kscc Күн бұрын
This content is second to none, but man, the more I stick with react/next.js, the more I feel I'm in the world of pain and footgunning. Much love, Jack.
@eljaz00
@eljaz00 21 сағат бұрын
The amount of info you give immense that I have to pause the video many time to make sense of this stuff
@yzz9833
@yzz9833 Күн бұрын
You been posting some bangers lately Jack
@armaandhanji2112
@armaandhanji2112 19 сағат бұрын
Hi Jack. Love your content. Would love to see your take on Tanstack Start! (I've been loving it so far).
@jherr
@jherr 9 сағат бұрын
Definitely planning on it. Please tell me what you like about it.
@umavictor
@umavictor Күн бұрын
Thanks Jack. Your content is invaluable
@frostmichael8360
@frostmichael8360 15 сағат бұрын
Awesome content, Thanks !
@whynot9963
@whynot9963 20 сағат бұрын
Awesome video, as always. Quick question, how do you get the terminal to show that LSP style autocomplete for commanda you can run?
@TheHoinoel
@TheHoinoel Күн бұрын
nice video! I know you're advertising your course with it, but I would love to see how to cache server functions. I am totally confused as to when and what will be cached
@couragic
@couragic 20 сағат бұрын
20:10 returning component from server action smells like htmx 😊
@prashlovessamosa
@prashlovessamosa Күн бұрын
I was excited when server actions and other stuff were introduced now I am totally confused about the server function action wtf going on in the react ecosystem. I am all in for Svelte.
@ivan.jeremic
@ivan.jeremic Күн бұрын
just use svelte why comment.
@prashlovessamosa
@prashlovessamosa Күн бұрын
@@ivan.jeremic I have to learn react as no one pays me for writing Sveltekit as a lot of crackers still exsist you are one of them
@MerthanMerter
@MerthanMerter 4 сағат бұрын
​@@ivan.jeremic because comments were invented to get feedback, thoughts and ideas from community? in fact why would you comment something like that?
@panoscool_
@panoscool_ 16 сағат бұрын
Hi Jack, can you share the github for these examples pls?
@jherr
@jherr 9 сағат бұрын
Yeah, I'm on the road and away from the machine that had the final code. I'll post it tomorrow (wednesday) morning.
@panoscool_
@panoscool_ 6 сағат бұрын
@jherr thanks a lot!
@avneet12284
@avneet12284 23 сағат бұрын
Is there a repo for this? Nice content
@Fuzbo_
@Fuzbo_ Күн бұрын
Still don’t see the value prop for server functions specifically other than type-safe return types, co-locating data fetches / mutations, and ability to submit forms without JS. For every benefit they offer it feels like it comes with 10x as many gotchas or footguns.
@yzz9833
@yzz9833 Күн бұрын
Personally, I would say a large value prop for server functions is actually being able to return entire components as html instead of rendering them on client. This also seems like a more graceful way of handling state changes in the dom versus doing it programmatically and risking re-renders.
@LehmannMr
@LehmannMr 14 сағат бұрын
Maybe you give next-safe-action a try. The code looks so much cleaner.
@AlainDuchesneau
@AlainDuchesneau 22 сағат бұрын
That was pretty fast! 😵‍💫
@LehmannMr
@LehmannMr 14 сағат бұрын
Whoever wants to work with server actions should take a look at the next-safe-action package which includes things like validation. Also be aware that server actions are an api endpoint which can be accessed via http directly and always should be checked for authentication and authorisation.
@aveshlutchman8573
@aveshlutchman8573 20 сағат бұрын
Server functions being unable to run in parallel is such a bummer. I have an app that uses a lot of Promise.all since i have many asynchronous tasks running. It sucks that i can't realistically use server functions for some tasks because of this. For example i have a transcript editor which has multiple segments, each segment having their own start and stop times. I would use server actions to load all of the data for each segment, but based on this info, i guess I'll have to use route handlers.
@vitorfigueiredomarques2004
@vitorfigueiredomarques2004 7 сағат бұрын
You Just need to call Promise.all in another sever function.
@Niksorus
@Niksorus Күн бұрын
Next.js and React did a terrible job at implementing this pattern. Even MORE footguns in React ... In the meantime, all the other frameworks find more elegant solutions, like Astro server actions.
@MerthanMerter
@MerthanMerter 3 сағат бұрын
J.H: god of react
@mpiorowski
@mpiorowski Күн бұрын
This is like the perfect advertisement to not touch React, even with the longest stick. 😄
@brianllllll
@brianllllll Күн бұрын
Lol
@cafelutsa_
@cafelutsa_ Күн бұрын
Don't touch it, no need for more mediocre React devs to join the soup of bad code
@AdamK3l
@AdamK3l Күн бұрын
What do you recommend instead?
@m12652
@m12652 16 сағат бұрын
@@AdamK3l SvelteKit
@LehmannMr
@LehmannMr 14 сағат бұрын
​@@m12652Hm. If you look at the numbers of react applications compared to svelte I don't think it is a good choice. Also if you look how many good react tutorials are out ther for react compared to svelte.
@adambickford8720
@adambickford8720 10 сағат бұрын
That concurrency model will cost the industry billions.
@Tay74514
@Tay74514 23 минут бұрын
React IS the trap 🕳️😂
@macccu
@macccu Күн бұрын
We are literally back to PHP returning parts of template from backend lol. Soon there will be tons of low quality React tutorials that will teach newcomers to mix backend and frontend code creating all famous "spaghetti code". Then will we will go "hmm there must be a way to split front and back!"
@vitfirringur
@vitfirringur Күн бұрын
It's not the same, friend. You are just demonstrating your ignorance here. You're not returning a "template".
@yzz9833
@yzz9833 Күн бұрын
@@vitfirringurthis
@adambickford8720
@adambickford8720 10 сағат бұрын
@@vitfirringur Might want to brush up on your history. This is a very, very old idea.
@o_glethorpe
@o_glethorpe 23 сағат бұрын
The best not so hidden mistake is to actually put react on the server.
Fixing some HTML canvas tests for WPT
1:09:43
Andreas Kling
Рет қаралды 10 М.
Legend State v3: Local first sync AND fastest React State manager!
16:10
How do Cats Eat Watermelon? 🍉
00:21
One More
Рет қаралды 12 МЛН
Running With Bigger And Bigger Lunchlys
00:18
MrBeast
Рет қаралды 129 МЛН
Крутой фокус + секрет! #shorts
00:10
Роман Magic
Рет қаралды 31 МЛН
Setting up a production ready VPS is a lot easier than I thought.
29:50
Being Competent With Coding Is More Fun
11:13
TheVimeagen
Рет қаралды 91 М.
multi step form tutorial next js react hook form
2:26:36
Santiago manso
Рет қаралды 2,5 М.
The Most Important Design Pattern in React
35:04
Cosden Solutions
Рет қаралды 66 М.
The Best Programmer I Know • Daniel Terhorst-North • GOTO 2024
48:33
GOTO Conferences
Рет қаралды 61 М.
React 19's useOptimistic: EVERYTHING you NEED to know
25:24
Jack Herrington
Рет қаралды 15 М.
This is How I Scrape 99% of Sites
18:27
John Watson Rooney
Рет қаралды 109 М.
Big Suspense Changes in React 19: Explained In Code
17:31
Jack Herrington
Рет қаралды 27 М.
Java 23 - Better Language, Better APIs, Better Runtime
57:39
How do Cats Eat Watermelon? 🍉
00:21
One More
Рет қаралды 12 МЛН