error img is a self-closing tag and must neither have children
nor use dangerouslySetInnerHTML
.
#9020
Labels
- P3: minor bug
An edge case that only affects very specific usage (priority)
pkg: react
Related to React (scope)
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When I pass img tag as props to react component, I got an error: 'img is a self-closing tag and must neither have children nor use dangerouslySetInnerHTML.'.
but if the img tag coding in the react component, it's working.
the astro code:
the react code:
What's the expected result?
I hope can pass the img tag to React component, because astro components is deficient, and most of it is development phase.
Link to Minimal Reproducible Example
https://codesandbox.io/p/sandbox/angry-sun-xpzhps?file=%2Fsrc%2Fcomponents%2FCarousel.tsx%3A16%2C19
Participation
The text was updated successfully, but these errors were encountered: