Nowadays, JSX doesn't compile to React.createElement, if this is your input:
React.createElement
<div> <h3>JSX Demo</h3> <img src="image.src" /> </div>
The output is not longer this:
React.createElement( "div", null, React.createElement("h3", null, "JSX Demo"), React.createElement("img", { src: "image.src" }) );
Nowadays this is the output:
_jsxs( "div", { children: [ _jsx("h3", { children: "JSX Demo" }), _jsx("img", { src: "image.src" }) ] } );
And importing react is no longer needed, the import is now implicit.
react
Cheers!
Thnx for the Correction Bro
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nowadays, JSX doesn't compile to
React.createElement, if this is your input:The output is not longer this:
Nowadays this is the output:
And importing
reactis no longer needed, the import is now implicit.Cheers!
Thnx for the Correction Bro