# Headline
Content
\```
some code
without the back slashes
\```
results in
Warning: A props object containing a "key" prop is being spread into JSX:
let props = {key: someKey, className: ..., children: ..., style: ...};
<span {...props} />
React keys must be passed directly to JSX without using spread:
let props = {className: ..., children: ..., style: ...};
<span key={someKey} {...props} />
It is related to the latest react version starting with ^18.3.0. I could only reproduce it after pinning the version to the latest version we're using. Checking 18.2.0 works without warnings.
"dependencies": {
"react": "18.3.1",
}
pnpm ladle dev
Navigate to the the story: Mdx > Welcome, check browser console.
Create a
.mdx
file, add code block:results in
Reproduction
https://stackblitz.com/edit/ladle-g4whwj?file=src%2Fmdx.stories.mdx
Open console in browser to see warning.
It is related to the latest react version starting with
^18.3.0
. I could only reproduce it after pinning the version to the latest version we're using. Checking18.2.0
works without warnings.Navigate to the the story: Mdx > Welcome, check browser console.
Environment