'Cannot update unmounted components' warning with React's Hooks

preview_player
Показать описание
If you're using React's hooks and are running into a warning:

"Can't perform a React state update on an unmounted component"

then you'll probably enjoy this week's snippet!

---

The example code used in the video can be found on GitHub:

---

Thanks for watching! Make sure to leave a comment letting me know how you enjoyed this week's snippet!

Projects:

Рекомендации по теме
Комментарии
Автор

Such a great feeling when you find the video that explains your exact issue. Thank you!

AnimeMoments
Автор

I CANNOT THANK YOU ENOUGH. THIS HAS BEEN MY PROBLEM FOR HOURS AND AN ALMOST 3 MINUTES VIDEO SOLVED MY PROBLEM

marconabung
Автор

That is the best explanation so far. Thank you.

borasumer
Автор

I thought it was harder, thank you for explaining this

ivandez
Автор

This is usually common on get request using useEffect or componentDidMount, but what if you have a button that process post, patch, put, delete request? How do you clean it up? Lets say you're using axios, will useCallback be the right hook to return a cleanup function for event driven requests?

paolo-
Автор

How do you do this with class component

wilmararias
Автор

Was struggling to fix this error. Really helped. Thanks!

dmgcoding
Автор

yes this feelings is good, i felt like this when i found this video, also i was fine cuz this man is speak good at english not like " firstflis", but unfortunately it can't help me 😓

surecode