You're Doing React Hooks Wrong, Probably

Pubblicato il: 14 luglio 2021
sul canale di: Jack Herrington
65,737
2.9k

Let's see how to get the most our of React hooks by using them as a reactive state management system by making proper use of the dependency arrays with useEffect, useMemo and useCallback.

Github: ​https://github.com/jherr/reactive-pok...
Codesandbox: ttps://codesandbox.io/s/github/jherr/reactive-pokemon/tree/main/?file=/src/App.tsx
Completed code: https://github.com/jherr/reactive-pok...
Spreadsheet: https://docs.google.com/spreadsheets/...
Kent C. Dobbs Article: https://kentcdodds.com/blog/usememo-a...

00:00 Introduction
02:20 Project setup
03:45 Getting the data
05:18 Creating derived data the wrong way
08:03 Tracking re-renders
09:05 How React.memo works
10:24 Using useMemo
11:55 Dependency graphs in React
14:54 Adding search
17:03 Diagramming the data flow
19:05 Tips for getting it right
19:58 Outroduction

If you liked this video, buy me a coffee! https://www.buymeacoffee.com/bluecoll...

Typescript Playground: https://www.typescriptlang.org/play
Types vs Interfaces:
https://blog.logrocket.com/types-vs-i...
https://www.typescriptlang.org/docs/h...

👉 What's my theme? Night Wolf [dark blue]
👉 What's that font? MonoLisa
👉 Jack is also on the React Round Up podcast: https://devchat.tv/podcasts/react-rou...
👉 Don't forget to subscribe to this channel for more updates: https://bit.ly/2E7drfJ
👉 Discord server signup:   / discord  

💢 Watch our other videos:
💟 Hacking your Github contribution graph:    • Hacking Your Github Contribution Graph || ...  
💟 More Typescript videos:    • JavaScript to TypeScript: Beginner to Master  

Thank you for watching this video, click the "SUBSCRIBE" button to stay connected with this channel.

#typescript #react #reactive


In questa pagina del sito puoi guardare il video online You're Doing React Hooks Wrong, Probably della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Jack Herrington 14 luglio 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 65,737 volte e gli è piaciuto 2.9 mille spettatori. Buona visione!