react
Seif Sgayer
React useEffect Cleanup
useEffect(() => {
const subscription = api.subscribe();
return () => {
// Always cleanup subscriptions!
subscription.unsubscribe();
};
}, []);
Join 50,000+ developers receiving weekly tips and tricks to level up their skills.