DEV Community

Imran Hasan
Imran Hasan

Posted on

What is JSX

Jsx means Javascript xml.JSX makes it easier to write and add HTML in React.JSX allows us to write HTML elements in JavaScript and place them in the DOM without any createElement() and appendChild() methods.JSX converts HTML tags into react elements.

Example with Jsx:
const myelement =

'hello world!'

;
ReactDOM.render(myelement, document.getElementById('root'));
Example without Jsx:
const myelement = React.createElement('h1', {}, 'hello world!');

ReactDOM.render(myelement, document.getElementById('root'));

Top comments (0)