Тёмный

5 Hidden React Server Function TRAPS Beginners Fall Into 

Jack Herrington
Подписаться 186 тыс.
Просмотров 5 тыс.
50% 1

Опубликовано:

 

7 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 39   
@snsa_kscc
@snsa_kscc 22 часа назад
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 18 часов назад
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 16 часов назад
Hi Jack. Love your content. Would love to see your take on Tanstack Start! (I've been loving it so far).
@jherr
@jherr 6 часов назад
Definitely planning on it. Please tell me what you like about it.
@umavictor
@umavictor День назад
Thanks Jack. Your content is invaluable
@frostmichael8360
@frostmichael8360 12 часов назад
Awesome content, Thanks !
@whynot9963
@whynot9963 17 часов назад
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 17 часов назад
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 Час назад
​@@ivan.jeremic because comments were invented to get feedback, thoughts and ideas from community? in fact why would you comment something like that?
@avneet12284
@avneet12284 20 часов назад
Is there a repo for this? Nice content
@panoscool_
@panoscool_ 13 часов назад
Hi Jack, can you share the github for these examples pls?
@jherr
@jherr 6 часов назад
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_ 3 часа назад
@jherr thanks a lot!
@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 11 часов назад
Maybe you give next-safe-action a try. The code looks so much cleaner.
@AlainDuchesneau
@AlainDuchesneau 19 часов назад
That was pretty fast! 😵‍💫
@mpiorowski
@mpiorowski День назад
This is like the perfect advertisement to not touch React, even with the longest stick. 😄
@brianllllll
@brianllllll 23 часа назад
Lol
@cafelutsa_
@cafelutsa_ 22 часа назад
Don't touch it, no need for more mediocre React devs to join the soup of bad code
@AdamK3l
@AdamK3l 21 час назад
What do you recommend instead?
@m12652
@m12652 13 часов назад
@@AdamK3l SvelteKit
@LehmannMr
@LehmannMr 11 часов назад
​@@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.
@LehmannMr
@LehmannMr 11 часов назад
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 17 часов назад
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 4 часа назад
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 Час назад
J.H: god of react
@adambickford8720
@adambickford8720 7 часов назад
That concurrency model will cost the industry billions.
@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 7 часов назад
@@vitfirringur Might want to brush up on your history. This is a very, very old idea.
@o_glethorpe
@o_glethorpe 20 часов назад
The best not so hidden mistake is to actually put react on the server.
Далее
React 19's useOptimistic: EVERYTHING you NEED to know
25:24
Harley Quinn is amazing.  #cosplay #joker#Harriet Quinn
00:11
ПЛАН ПРОТИВОДЕЙСТВИЯ МЕДВЕДЮ.
00:28
ShadCN’s Revolutionary New CLI
12:11
Просмотров 50 тыс.
The Most Important Design Pattern in React
35:04
Просмотров 66 тыс.
multi step form tutorial next js react hook form
2:26:36
Просмотров 2,4 тыс.
Why Everyone Loves Zustand
29:27
Просмотров 88 тыс.
Being Competent With Coding Is More Fun
11:13
Просмотров 91 тыс.
Big Suspense Changes in React 19: Explained In Code
17:31
Using AI Structured Output with NextJS & React
18:12
Payload: The Complete Backend for NextJS
27:10
Просмотров 41 тыс.
The Problem with React Server Actions
9:45
Просмотров 20 тыс.
NSURLProtocol: How I Stole an App For My Wedding
56:25
Harley Quinn is amazing.  #cosplay #joker#Harriet Quinn
00:11