On The Bike Shed, hosts Joël Quenneville and Stephanie Minn discuss development experiences and challenges at thoughtbot with Ruby, Rails, JavaScript, and whatever else is drawing their attention, admiration, or ire this week.
…
continue reading
Nội dung được cung cấp bởi Frontend First, Sam Selikoff, and Ryan Toronto. Tất cả nội dung podcast bao gồm các tập, đồ họa và mô tả podcast đều được Frontend First, Sam Selikoff, and Ryan Toronto hoặc đối tác nền tảng podcast của họ tải lên và cung cấp trực tiếp. Nếu bạn cho rằng ai đó đang sử dụng tác phẩm có bản quyền của bạn mà không có sự cho phép của bạn, bạn có thể làm theo quy trình được nêu ở đây https://vi.player.fm/legal.
Player FM - Ứng dụng Podcast
Chuyển sang chế độ ngoại tuyến với ứng dụng Player FM !
Chuyển sang chế độ ngoại tuyến với ứng dụng Player FM !
React Deep Dive: useOptimistic
MP3•Trang chủ episode
Manage episode 400981458 series 1635850
Nội dung được cung cấp bởi Frontend First, Sam Selikoff, and Ryan Toronto. Tất cả nội dung podcast bao gồm các tập, đồ họa và mô tả podcast đều được Frontend First, Sam Selikoff, and Ryan Toronto hoặc đối tác nền tảng podcast của họ tải lên và cung cấp trực tiếp. Nếu bạn cho rằng ai đó đang sử dụng tác phẩm có bản quyền của bạn mà không có sự cho phép của bạn, bạn có thể làm theo quy trình được nêu ở đây https://vi.player.fm/legal.
Ryan and Sam discuss the purpose and usage of the useOptimistic() hook, a new experimental API from React.
Topics include:
- 0:00 - Intro
- 2:18 - Problem: RSCs require a server roundtrip before the UI can be updated
- 10:13 - Solution: useOptimistic() lets you merge ephemeral client-side state with server-side data so you can update the UI during a Server Action or Transition
- 14:03 - How useOptimistic() avoids the notion of identity by discarding the ephemeral state after the app settles
- 21:17 - How useOptimistic() lets you safely “fork” state that eventually syncs with the server
- 27:32 - Handling error states
- 29:26 - Differences between useOptimistic() and Remix fetchers
- 34:57 - How useOptimistic() lets you avoid managing a long-lived client-side cache
Links:
201 tập
MP3•Trang chủ episode
Manage episode 400981458 series 1635850
Nội dung được cung cấp bởi Frontend First, Sam Selikoff, and Ryan Toronto. Tất cả nội dung podcast bao gồm các tập, đồ họa và mô tả podcast đều được Frontend First, Sam Selikoff, and Ryan Toronto hoặc đối tác nền tảng podcast của họ tải lên và cung cấp trực tiếp. Nếu bạn cho rằng ai đó đang sử dụng tác phẩm có bản quyền của bạn mà không có sự cho phép của bạn, bạn có thể làm theo quy trình được nêu ở đây https://vi.player.fm/legal.
Ryan and Sam discuss the purpose and usage of the useOptimistic() hook, a new experimental API from React.
Topics include:
- 0:00 - Intro
- 2:18 - Problem: RSCs require a server roundtrip before the UI can be updated
- 10:13 - Solution: useOptimistic() lets you merge ephemeral client-side state with server-side data so you can update the UI during a Server Action or Transition
- 14:03 - How useOptimistic() avoids the notion of identity by discarding the ephemeral state after the app settles
- 21:17 - How useOptimistic() lets you safely “fork” state that eventually syncs with the server
- 27:32 - Handling error states
- 29:26 - Differences between useOptimistic() and Remix fetchers
- 34:57 - How useOptimistic() lets you avoid managing a long-lived client-side cache
Links:
201 tập
Все серии
×Chào mừng bạn đến với Player FM!
Player FM đang quét trang web để tìm các podcast chất lượng cao cho bạn thưởng thức ngay bây giờ. Đây là ứng dụng podcast tốt nhất và hoạt động trên Android, iPhone và web. Đăng ký để đồng bộ các theo dõi trên tất cả thiết bị.