Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Warning: Prop className did not match. Server: "css-j5xrcq-Component" Client: "css-13v2oeb-HomeIcon" #3176

Open
therealgilles opened this issue Apr 7, 2024 · 0 comments

Comments

@therealgilles
Copy link

therealgilles commented Apr 7, 2024

Current behavior:
I am using NextJS 14 (App router) with emotion with twin.macro and tailwindcss. I am getting this single SSR/CSR mismatch warning but I don't know how to address it.

app-index.js:35 Warning: Prop `className` did not match. Server: "css-j5xrcq-Component" Client: "css-13v2oeb-HomeIcon"

The HomeIcon component is a react-icon/fa component called FaHome (which is an SVG element) added as follows:

/** @jsxImportSource @emotion/react */
'use client'

import { FaHome } from 'react-icons/fa'
import from 'twin.macro'

const HomeIcon = () => <FaHome className="text-xl" />

To reproduce:
Not sure.

Expected behavior:
I am not expecting any SSR/CSR mismatch. I have tried this suggestion but it didn't make any difference in my case.

Looking for advice and wondering if this is a bug.

Environment information:

  • react version: 18.2.0
  • @emotion/react version: 11.11.4
  • twin.macro version: 3.4.1
  • next version: 14.1.4 (using App router)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant