Gå frakoblet med Player FM -appen!
All about useEvent
Manage episode 328275223 series 1635850
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:
185 episoder
Manage episode 328275223 series 1635850
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:
185 episoder
All episodes
×Velkommen til Player FM!
Player FM scanner netter for høykvalitets podcaster som du kan nyte nå. Det er den beste podcastappen og fungerer på Android, iPhone og internett. Registrer deg for å synkronisere abonnement på flere enheter.