DEV Community

Discussion on: How to use Local Storage in Next.js

Collapse
 
pablojsx profile image
Pablojsx

does 'use client' works with nextjs pages? I'm a bit confused

Collapse
 
prems5 profile image
PREM KUMAR

Yes, it works on the new routes folder. Where all the components are server components by default. You need to specify use client
To make it as a client side component

Thread Thread
 
pablojsx profile image
Pablojsx

sorry I mean pages router not nextjs pages, is it an app router thing only?