Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Warning: Prop className did not match. while utilizing rimble within nextjs project #454

Open
pkhodaveissi opened this issue Apr 14, 2021 · 1 comment

Comments

@pkhodaveissi
Copy link

Describe the bug
Using rimble-ui within nextjs project gives this warning:

Warning: Prop className did not match. Server: "sc-gsDJrp sc-lgkoQy sc-hIfwMU ctiSSV hJYniQ hUBFOd" Client: "Box__StyledBox-ha1bw0-0 BaseButton__StyledButton-sc-1o9z2ni-0 SolidButton__StyledSolidButton-goy2oa-0 hEwKXO jjNsaJ gxrTYq"

To Reproduce
Use one of rimble comps within nextjs

Rimble UI Version

 "dependencies": {
    "next": "latest",
    "opensea-js": "^1.1.11",
    "react": "^17.0.1",
    "react-dom": "^17.0.1",
    "rimble-ui": "^0.14.0",
    "styled-components": "^5.2.3",
    "web3": "^1.3.5"
  },
  "devDependencies": {
    "@types/node": "^12.12.21",
    "@types/react": "^17.0.2",
    "@types/react-dom": "^17.0.1",
    "@types/styled-components": "^5.1.9",
    "babel-plugin-styled-components": "^1.12.0",
    "typescript": "4.0"
  }

Desktop:

  • OS: MACOS
  • Chrome
  • Version 89
@schnerd
Copy link

schnerd commented May 16, 2021

I ran into this also.

I set up a custom document for next.js that configures styled components for server side rendering (see example). This at least got styles rendering correctly, however I still see the className mismatch console error you allude to.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants