Next.js Discord

Discord Forum

Hi, does anyone have examples on how to split this

Unanswered
Brittany posted this in #help-forum
Open in Discord
BrittanyOP
I'm getting the following error an wondering if anyone has a good example on how to split the file to avoid the error.

What would be a good practice


Error:
× You're importing a component that needs next/headers. That only works in a Server Component but one of its parents is marked with "use client", so it's a Client Component.
│ Learn more: https://nextjs.org/docs/getting-started/react-essentials

1 Reply