Nextjs with CSS in JS

I am using ant design (https://ant.design) on a Nextjs project (pages folder). The component styles don't seem to be SSRd, there is a flash of unstyled content when the page is first loaded. Ant design docs have some instructions on how to do SSR - https://ant.design/docs/react/customize-theme#server-side-render-ssr But I can't figure out how these apply to Nextjs.
4 Replies
JEM
JEM2y ago
So with styled-components we need to do something similar, in nextjs you should have a _document.jsx not sure exactly how you need to do it with ant, but this should be helpful at least
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
devagr
devagrOP2y ago
I'm kinda stuck on ant since we also used their figma library to build our designs if I can't figure out SSR with ant I'll probably just move to tailwind
shaaah
shaaah2y ago
Can you show an example of what have you tried so far
Want results from more Discord servers?
Add your server