You probably don't need useEffect for that
Most effects in a React codebase are derived state or event handlers in disguise
Apr 18, 20262 min read

Search for a command to run...
Articles tagged with #react
Most effects in a React codebase are derived state or event handlers in disguise

useEffect is one of React’s most important hooks for handling side effects in function components: data fetching, subscriptions, timers, DOM mutations after render, and more. This article explains how