Add
'use client';
on top of the file where you are using handleClick
because all components in Next 13 by default are server components, therefore for client side interactivity you need to use use client
.
Add
'use client';
on top of the file where you are using handleClick
because all components in Next 13 by default are server components, therefore for client side interactivity you need to use use client
.