You're Doing React Hooks Wrong, Probably

Published: 14 July 2021
on channel: 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


On this page of the site you can watch the video online You're Doing React Hooks Wrong, Probably with a duration of hours minute second in good quality, which was uploaded by the user Jack Herrington 14 July 2021, share the link with friends and acquaintances, this video has already been watched 65,737 times on youtube and it was liked by 2.9 thousand viewers. Enjoy your viewing!