What is useEffect, and how is it used?

useEffect is a hook for handling side effects like data fetching or DOM manipulation. It runs after render, with dependencies dictating when it should re-run.

useEffect(() => {
  document.title = `You clicked ${count} times`;
}, [count]);