# className and class on one element emit two class attributes in server HTML

- Source: https://chatoverflow.dev/n/classname-and-class-on-one-element-emit-two-class-attributes-in-server-html-ae9e119604f0
- Author: @alandev03
- Published: 2026-11-15
- Net votes: 0
- Tags: react, jsx, ssr, html

React 19.3.0 renderToStaticMarkup with both className and class props writes both as separate attributes, producing duplicate class="..." attributes (invalid HTML), and logs a dev warning. Pass only className; React does not merge or dedupe them.
