惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
爱范儿
爱范儿
博客园_首页
博客园 - 【当耐特】
V
Visual Studio Blog
博客园 - 叶小钗
月光博客
月光博客
美团技术团队
J
Java Code Geeks
小众软件
小众软件
Y
Y Combinator Blog
博客园 - Franky
Martin Fowler
Martin Fowler
博客园 - 聂微东
Microsoft Azure Blog
Microsoft Azure Blog
IT之家
IT之家
MyScale Blog
MyScale Blog
人人都是产品经理
人人都是产品经理
Microsoft Security Blog
Microsoft Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
酷 壳 – CoolShell
酷 壳 – CoolShell
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
云风的 BLOG
云风的 BLOG

Syntax - Tasty Web Development Treats

Diffs, Trees, and VS Code 2.0 - Syntax #1008 8 Tech Choices to Lock In Before Agentmaxxing - Syntax #1007 Can AI Make Good Design? - Syntax #1006 Programatic and Skill based Video Creation with Remotion - Syntax #1005 TanHacked - Syntax #1004 Skills Skills Skills - Syntax #1003 The Real Pricing of LLMs - Syntax #1002 Managing Deadlines + Stress - Syntax #1001 Syntax Episode 1,000! - Syntax #1000 Writing Maintainable CSS - Syntax #999 How to Fix Vibe Coding - Syntax #998 Rating and Roasting Your Projects - Syntax #997 10 New CSS and HTML APIs - Syntax #996 Next.js Vendor Lock-in No More - Syntax #995 AI Sucks At CSS - Syntax #994 It’s Been A Hell Of Week - Syntax #993 Migrating Legacy Code Just Got Easier - Syntax #992 Vite’s bet on Cloudflare (VOID Framework) - Syntax #991 Vite Is Taking Over (Vite+) - Syntax #990 State of JS 2025 - Syntax #989 Cloudflare’s Next.js Slop Fork - Syntax #988 Remote Coding Agents - Syntax #987 Does Code Quality Matter Anymore? - Syntax #986 Stop putting secrets in .env - Syntax #985 How to Make a DOM Library Render Anything w/ Paolo Ricciuti - Syntax #984 Why I Chose Electron Over Native (And I’d Do It Again) - Syntax #983 Bots Are Ruining the Internet - Syntax #982 Browsers Are Finally Catching Up (Interop 2026) - Syntax #981 AI Coding Explained - Syntax #980 WebMCP: New Standard to Expose Your Apps to AI - Syntax #979
React Server Components: Form Actions + Server Actions - ...
2024-05-08 · via Syntax - Tasty Web Development Treats
766

May 8th, 2024 × #react#server-components#forms

Discussion on using actions and form actions in React Server Components for calling server code from the client side without needing a separate API

Wes Bos

Wes Bos Host

Scott Tolinski

Scott Tolinski Host

Scott and Wes are here to guide you through the world of React Server Components, shedding light on the intricacies of Form Actions and Server Actions. Get ready to level up your React skills as they discuss the ins and outs of these powerful features and share their expert advice on optimizing your applications.

Show Notes

  • 00:00 Welcome to Syntax!
  • Show 718 React Server Components.
  • 02:04 Brought to you by Sentry.io.
  • 03:04 What are form actions?
  • GitHub Add React.useActionState PR
  • 04:05 Almost entirely React.
  • 04:31 What is the 'server' in Vanilla React?
  • 06:10 Would React ever ship their own server?
  • 07:29 What are actions?
  • 08:34 Two huge benefits to actions.
    • 08:45 Avoid custom useEffects or third party libraries.
    • 09:17 Calling server code from the client without any APIS.
  • 11:31 Some examples of actions.
  • 12:54 Can these actions be done in a client component?
  • 13:40 Where to use actions.
    • 13:49 On a form submit.
    • 15:30 In an event handler.
    • 15:57 In a useEffect().
  • 17:13 How to actually use an action.
  • React Hooks
  • 24:38 Action inputs.
  • 26:13 Server vs client.
  • 28:30 This is not PHP.
  • 30:31 What is optimistic UI?
  • 37:02 Some final thoughts.
  • 40:18 Sick Picks + Shameless Plugs.

Sick Picks

Syntax: X Instagram Tiktok LinkedIn Threads

Wes: X Instagram Tiktok LinkedIn Threads

Scott:X Instagram Tiktok LinkedIn Threads

Randy: X Instagram YouTube Threads