Super expression error in Next 13

How to resolve super expression error in Nextjs


You may have experienced super expression error in Nextjs 13 app with appdir feature.

The error will raise when declare client-side component in app 📂, the app 📂 is server side by default.

The solution is to this is to mark the component as client by placing

 'use client';

at the top of the component declaration.

Reference

Author: Manoj

Developer and a self-learner, love to work with Reactjs, Angular, Node, Python and C#.Net

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.