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
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•2y ago
Message Not Public
Sign In & Join Server To View
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
Can you show an example of what have you tried so far