ant-design / ant-design/cssinjs

Prop `className` did not match.

Open
#52 16 comments 16 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
287
Forks
80
PR merge metrics
No merged PRs in 30d

Description

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:

![image](https://user-images.githubusercontent.com/20705423/202668312-d1a307a2-205f-4567-9499-57857e7117ed.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

No source files or tests are named. Start by reproducing the warning with the reported Next.js 13 and antd 5 setup, then trace the server and client className generation; done means the server and client className values match without the hydration warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.