Open useCallback opened 1 year ago
it may be because this example does not use any provider from antd, you can use this official example from antd for SSR: https://github.com/ant-design/create-next-app-antd
Hi, just want to confirm - is this issue fixed?
Just came across this issue - https://github.com/ant-design/create-next-app-antd is not suitable when using the app folder structure though.
I am new to this repository. I would love to work on this issue. Can you guide me how to further approach this issue.?
I solved this by setting the @ant-design/cssinjs
version resolution on my package.json:
{
"resolutions": {
"@ant-design/cssinjs": "1.17.2"
}
}
I'm using the Next.js 13.5.1 app dir and AntD 5.10.2.
@alexrohleder solved my problem. I recommed you to read Antd documentation to find which "@ant-design/cssinjs" version that you should choose.
Verify canary release
Provide environment information
Which example does this report relate to?
with-ant-design
What browser are you using? (if relevant)
Chrome 112.0.5615.49
How are you deploying your application? (if relevant)
Vercel
Describe the Bug
Flash of Unstyled content using Ant Design with Nextjs :
When using Ant Design with Next JS the HTML gets rendered unstyled ( barebone HTML elements) for a fraction of a second , and then the styles get loaded and the components are rendered correctly
Expected Behavior
the first contentful-paint should be properly styled
To Reproduce
clone the with-ant-design example and host it