cssinjs
cssinjs copied to clipboard
Prop `className` did not match.
Hi, I'm using nextjs@13 + antd@5.
And browser show this in devtool:
Warning: Prop `className` did not match.
Server: "ant-menu-overflow ant-menu ant-menu-root ant-menu-horizontal ant-menu-dark css-dev-only-do-not-override-1dsa5t3"
Client: "ant-menu-overflow ant-menu ant-menu-root ant-menu-horizontal ant-menu-dark css-dev-only-do-not-override-t98trl"
Which I think there are something wrong with this:
So, hash function may run twice, once in server, once in client ?
Hi there with next js v12.2.2 and ant v5 it also reproducible
Hello with "next": "13.0.4" and ant v5 also reproducible
This is a serious bug
Same issues. ☹️
Any update on this?
const ProLayout = dynamic( () => import("@ant-design/pro-components").then((com) => com.ProLayout), { ssr: false } );
if you are using Pro Layout component, then you can use this code. It would defeat the purpose of using SSR.
m
I found website with solution
any update?
I'm also having this error when using AntD v5 and Remix v2, loading the AntD CSS using the "whole export" approach.
This issue happens with both "whole export" and "inline-styles".
const ProLayout = dynamic( () => import("@ant-design/pro-components").then((com) => com.ProLayout), { ssr: false } );
if you are using Pro Layout component, then you can use this code. It would defeat the purpose of using SSR.
this resolved my problem,thanks.
next14 have the same problem
const ProLayout = dynamic( () => import(“@ant-design/pro-components”).then((com) => com.ProLayout), { ssr: false } );
如果您使用的是 Pro Layout 组件,则可以使用此代码。这将破坏使用 SSR 的目的。
This is a bad idea
I'm also having this error when using AntD v5 and Remix v2, loading the AntD CSS using the "whole export" approach.
I am also seeing this in AntD 5 and Remix 2