Need Assistance?

support@tutorialshub.in

Server vs Client Components

Client Components ("use client")

ADVERTISEMENT
Next.js Free Lesson
5 min read
ADVERTISEMENT

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
Hi, I'm Tuby! Here to help you