MENU

Fun & Interesting

5 Hidden React Server Function TRAPS Beginners Fall Into

Jack Herrington 11,695 6 months ago
Video Not Working? Fix It Now

The server function support in React 18, 19, NextJS and Waku is amazing. But there are some downsides. Let's dig in and find out what those are! 👉 ProNextJS Course: https://pronextjs.dev 👉 Don't forget to subscribe to this channel for more updates: https://bit.ly/2E7drfJ 👉 Discord server signup: https://discord.gg/ddMZFtTDa5 👉 VS Code theme and font? Night Wolf [black] and Operator Mono 👉 Terminal Theme and font? oh-my-posh with custome prompt and SpaceMono NF 00:00 Introduction 00:47 Directly invoking server functions 02:42 Server functions from form 04:02 Returning state with useActionState 06:12 useActionState with direct invocations 07:10 “use server” at the top of the file 09:05 Gotcha! Monitoring server actions 10:23 Gotcha! Serial server functions 12:55 Gotcha! POST only 14:18 Gotcha! No streaming 17:27 Gotcha! Can’t send functions 19:41 Returning components 20:50 Outroduction

Comment