How to prevent React setState on unmounted component – a different approach
dev.to