Artwork

Contenuto fornito da Kent C. Dodds. Tutti i contenuti dei podcast, inclusi episodi, grafica e descrizioni dei podcast, vengono caricati e forniti direttamente da Kent C. Dodds o dal partner della piattaforma podcast. Se ritieni che qualcuno stia utilizzando la tua opera protetta da copyright senza la tua autorizzazione, puoi seguire la procedura descritta qui https://it.player.fm/legal.
Player FM - App Podcast
Vai offline con l'app Player FM !

Realigning Your Model of React After Hooks With Dan Abramov

45:20
 
Condividi
 

Manage episode 239492334 series 2530175
Contenuto fornito da Kent C. Dodds. Tutti i contenuti dei podcast, inclusi episodi, grafica e descrizioni dei podcast, vengono caricati e forniti direttamente da Kent C. Dodds o dal partner della piattaforma podcast. Se ritieni che qualcuno stia utilizzando la tua opera protetta da copyright senza la tua autorizzazione, puoi seguire la procedura descritta qui https://it.player.fm/legal.

In this episode, Kent and Dan talk about the ways in which you'll have to reconstruct your mental model of how React works in order to get the hang of hooks, and how hooks more closely align with React's intended model.

React has made multiple attempts at figuring out a way to share state between components. Mixins, higher-order components, render props, and now hooks. Dan Abramov walks through what went right and what went wrong with each of the implementations prior to hooks. None of these implementations lined up with React's model, they were too indirect, or too limiting.

Classes didn't properly fit in with React's component model either. Components don't use inheritance, they aren't ever instantiated, you don't call methods off of them. Dan explains how Components are more like a stateful function, and how Hooks are a closer approximation of this mental model.


Resources

Guest: Dan Abramov

Host: Kent C. Dodds

  continue reading

89 episodi

Artwork
iconCondividi
 
Manage episode 239492334 series 2530175
Contenuto fornito da Kent C. Dodds. Tutti i contenuti dei podcast, inclusi episodi, grafica e descrizioni dei podcast, vengono caricati e forniti direttamente da Kent C. Dodds o dal partner della piattaforma podcast. Se ritieni che qualcuno stia utilizzando la tua opera protetta da copyright senza la tua autorizzazione, puoi seguire la procedura descritta qui https://it.player.fm/legal.

In this episode, Kent and Dan talk about the ways in which you'll have to reconstruct your mental model of how React works in order to get the hang of hooks, and how hooks more closely align with React's intended model.

React has made multiple attempts at figuring out a way to share state between components. Mixins, higher-order components, render props, and now hooks. Dan Abramov walks through what went right and what went wrong with each of the implementations prior to hooks. None of these implementations lined up with React's model, they were too indirect, or too limiting.

Classes didn't properly fit in with React's component model either. Components don't use inheritance, they aren't ever instantiated, you don't call methods off of them. Dan explains how Components are more like a stateful function, and how Hooks are a closer approximation of this mental model.


Resources

Guest: Dan Abramov

Host: Kent C. Dodds

  continue reading

89 episodi

Όλα τα επεισόδια

×
 
Loading …

Benvenuto su Player FM!

Player FM ricerca sul web podcast di alta qualità che tu possa goderti adesso. È la migliore app di podcast e funziona su Android, iPhone e web. Registrati per sincronizzare le iscrizioni su tutti i tuoi dispositivi.

 

Guida rapida