Whenever a component needs interactivity—like clicking a button, typing in a search box, using useState, useEffect, or accessing window/localStorage—it must be a Client Component.
To turn any component into a Client Component, just place 'use client'; on the very first line of the file.
ADVERTISEMENT