Answers for "what JSX"

16

what is jsx in react

instead of putting JavaScript into HTML,
JSX allows us to put HTML into JavaScript.
JSX stands for JavaScript XML. 
It is simply a syntax extension of React. 
It allows us to directly write HTML in React.
Posted by: Guest on July-03-2021
1

javascript in jsx

const name = 'Josh Perez';
const element = <h1>Hello, {name}</h1>;
//notice the use of {...} to jump from jsx to javascript.
ReactDOM.render(
  element,
  document.getElementById('root')
);
Posted by: Guest on May-01-2020

Browse Popular Code Answers by Language