Artwork

内容由Frontend First, Sam Selikoff, and Ryan Toronto提供。所有播客内容(包括剧集、图形和播客描述)均由 Frontend First, Sam Selikoff, and Ryan Toronto 或其播客平台合作伙伴直接上传和提供。如果您认为有人在未经您许可的情况下使用您的受版权保护的作品,您可以按照此处概述的流程进行操作https://zh.player.fm/legal
Player FM -播客应用
使用Player FM应用程序离线!

Exploring useActionState

59:57
 
分享
 

Manage episode 450217020 series 1635850
内容由Frontend First, Sam Selikoff, and Ryan Toronto提供。所有播客内容(包括剧集、图形和播客描述)均由 Frontend First, Sam Selikoff, and Ryan Toronto 或其播客平台合作伙伴直接上传和提供。如果您认为有人在未经您许可的情况下使用您的受版权保护的作品,您可以按照此处概述的流程进行操作https://zh.player.fm/legal

Sam and Ryan talk about React 19's useActionState hook. They discuss how adding async functions to a plain React app introduces lots of in-between states that developers must grapple with, and how useActionState allows React to collapse and eliminate these states, bringing the simplicity of React's sync mental model to our async code.

Timestamps:

  • 0:00 - Intro
  • 1:51 - How React normally eliminates state in synchronous apps
  • 8:20 - How useActionState lets React eliminate state in asynchronous apps
  • 18:17 - Why you shouldn't just pass server actions into useActionState
  • 23:00 - TCP/IP and UDP analogy
  • 26:39 - Thinking of useActionState like enqueue
  • 34:55 - Why the term "reducer" is too loaded for best understanding useActionState
  • 51:07 - How useActionState helps you build a Todo app that stays responsive during pending actions
  continue reading

201集单集

Artwork

Exploring useActionState

Frontend First

214 subscribers

published

icon分享
 
Manage episode 450217020 series 1635850
内容由Frontend First, Sam Selikoff, and Ryan Toronto提供。所有播客内容(包括剧集、图形和播客描述)均由 Frontend First, Sam Selikoff, and Ryan Toronto 或其播客平台合作伙伴直接上传和提供。如果您认为有人在未经您许可的情况下使用您的受版权保护的作品,您可以按照此处概述的流程进行操作https://zh.player.fm/legal

Sam and Ryan talk about React 19's useActionState hook. They discuss how adding async functions to a plain React app introduces lots of in-between states that developers must grapple with, and how useActionState allows React to collapse and eliminate these states, bringing the simplicity of React's sync mental model to our async code.

Timestamps:

  • 0:00 - Intro
  • 1:51 - How React normally eliminates state in synchronous apps
  • 8:20 - How useActionState lets React eliminate state in asynchronous apps
  • 18:17 - Why you shouldn't just pass server actions into useActionState
  • 23:00 - TCP/IP and UDP analogy
  • 26:39 - Thinking of useActionState like enqueue
  • 34:55 - Why the term "reducer" is too loaded for best understanding useActionState
  • 51:07 - How useActionState helps you build a Todo app that stays responsive during pending actions
  continue reading

201集单集

所有剧集

×
 
Loading …

欢迎使用Player FM

Player FM正在网上搜索高质量的播客,以便您现在享受。它是最好的播客应用程序,适用于安卓、iPhone和网络。注册以跨设备同步订阅。

 

快速参考指南

边探索边听这个节目
播放