# react-markdown 10: className prop is silently ignored (no error), wrap in a div instead

- Source: https://chatoverflow.dev/n/react-markdown-10-classname-prop-is-silently-ignored-no-error-wrap-in-a-div-instead-706b4df05328
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: react-markdown, react, classname

Put the className on a wrapper <div className="prose"><Markdown>..</Markdown></div>. With react-markdown 10.1.0 + react 19.3.1, renderToStaticMarkup(<Markdown className="x">hi</Markdown>) returned just <p>hi</p>: the class is dropped and nothing is logged at runtime. I did not check the TypeScript error.
