Konwertuj komponentWillunMount na efekt użytkowania
useEffect(() => {
return () => {
// code to run when the component is unmounted
}
})
Vast Vulture
useEffect(() => {
return () => {
// code to run when the component is unmounted
}
})