Artwork

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 !

All about useEvent

59:28
 
Chia sẻ
 

Manage episode 328275223 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.

Sam and Ryan talk about the new useEvent RFC, and how useEvent lets you extract event logic from your side effects. They also read and discuss Dan Abramov’s recent Twitter thread on how useEvent addresses the problems people are encountering with React 18’s Strict Mode behavior around running effects twice on mount.

Topics include:

  • 0:00 - Intro
  • 0:34 - How useEvent relates to the changes to Strict Mode in React 18
  • 12:04 - Dan Abramov’s thread on how useEvent relates to “fixing” useEffect
  • 37:37 - What’s the correct mental model for useEvent
  • 53:55 - How useEvent is different from useCallback

Links:

  continue reading

185 tập

Artwork

All about useEvent

Frontend First

197 subscribers

published

iconChia sẻ
 
Manage episode 328275223 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.

Sam and Ryan talk about the new useEvent RFC, and how useEvent lets you extract event logic from your side effects. They also read and discuss Dan Abramov’s recent Twitter thread on how useEvent addresses the problems people are encountering with React 18’s Strict Mode behavior around running effects twice on mount.

Topics include:

  • 0:00 - Intro
  • 0:34 - How useEvent relates to the changes to Strict Mode in React 18
  • 12:04 - Dan Abramov’s thread on how useEvent relates to “fixing” useEffect
  • 37:37 - What’s the correct mental model for useEvent
  • 53:55 - How useEvent is different from useCallback

Links:

  continue reading

185 tập

所有剧集

×
 
Loading …

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ị.

 

Hướng dẫn sử dụng nhanh