React's useEffect hook is a super hook to run side effects. The hook comes with a cleanup function, which you might not always need, but it can come in handy. Some use-cases for this are to clean up subscriptions, clean up modals and clear timeouts.

•2m read time•From h.daily-dev-tips.com
Post cover image
Table of contents
The basic use of useEffectCleaning up useEffectConclusion
19 Comments

Sort: