Hi, does anyone have examples on how to split this
Unanswered
Brittany posted this in #help-forum
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
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
@Brittany 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
Do you import this <Login /> component somewhere?