Open visualcookie opened 1 year ago
Hi! Neither emotion nor styled-components support serverside rendered components yet. There is more detail in this discussion https://github.com/arlyon/stailwc/discussions/12
In the mean time, if you wish to use emotion or styled-components with nextjs and the app router, please include the 'use client' directive as described in the error :)
I am going to leave this open for now as a tracking issue.
Hej. I've set up everything exactly the way described in your documentation and how Next.js told me to set up
styled-components
.I use the App Router for Next.js as I find this one pretty useful in my use-case. I've used this documentation part to set up
styled-components
: https://nextjs.org/docs/app/building-your-application/styling/css-in-js#styled-componentsThen I used your documentation to set up
stailwc
but getting an error, when usingtw.
styling which says the following:Right now I'm using an example from the
styled-components
set up of Next.js, which looks like this:What am I doing wrong?