Frontend Engineer
Cake Engineering - 03 March 2021
Hi, My name is Trung 😊
The Effect Hook lets you perform side effects in function components
useEffect(() => {
//effect
return () => {
//cleanup
}
}, [])
A side effect is when a function alters some external state that is not the intended return value.
React always clean up the previous effect before applying the next effect.
Thanks Chee for your support on my React journey 🤓