You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using "use client" className differs by trailing whitespace between server and client.
Inside off createLucideIcon.js className gets joined together by following line 23:
so if className is empty you end up having a trailing space.
Console output in browser:
Warning: Prop className did not match. Server: "lucide lucide-euro " Client: "lucide lucide-euro"
at svg...
Steps to reproduce
Any file with "use client" and rendering any icon without className specified leads to this warning/error
Checklist
I have searched if someone has submitted a similar issue before and there weren't any. (Please make sure to also search closed issues, as this issue might already have been resolved.)
The text was updated successfully, but these errors were encountered:
Hello together, I face exactly the same bug.
By trimming the resulting className string, the error is gone.
Could someone please add the .trim() after the .join(" ") to this line.
Package
Version
0.446.0
Can you reproduce this in the latest version?
Browser
Operating system
Description
When using "use client" className differs by trailing whitespace between server and client.
Inside off createLucideIcon.js className gets joined together by following line 23:
className: ["lucide",
lucide-${toKebabCase(iconName)}
, className].join(" ")so if className is empty you end up having a trailing space.
Console output in browser:
Warning: Prop
className
did not match. Server: "lucide lucide-euro " Client: "lucide lucide-euro"at svg...
Steps to reproduce
Any file with "use client" and rendering any icon without className specified leads to this warning/error
Checklist
The text was updated successfully, but these errors were encountered: