下面是我的具有jsx代码的jsxVarable
let JsxVarible = (
<div>
<h1>Hello this is from Jsx</h1>
</div>
)
ReactDOM.render(JsxVarible, document.getElementById("app"));
EveryThing工作正常
let JsxComponent = () =>(
<div>
<h1>We are rendering the JsxCompon
当我试图使用React呈现一个HTMLDivElement时,我遇到了这个问题,但是我得到了以下错误:
Uncaught Invariant Violation: Objects are not valid as a React child (found: [object HTMLDivElement]). If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons. Che