Next.js
beginner
15 min
useEffect
Learn about useEffect in Next.js.
useEffect
useEffect is a React Hook that lets you perform side effects in functional components, like fetching data or updating the document title. It runs after the component renders.
Example
useEffect(() => {\n document.title = 'My Page';\n}, []);Practice
Update the document title whenever a counter value changes.