JSX stands for JavaScript XML. It lets you write HTML-like code inside JavaScript, making UI creation easier in React.
π Example:
function App() {
const name = "Aman";
return <h1>Hello, {name}</h1>;
}
β¨ Key Points:
β’ JSX looks like HTML but works inside JavaScript
β’ You can use JavaScript expressions with {}
β’ JSX is converted into React.createElement() behind the scenes
JSX makes React code more readable and developer-friendly. π
Top comments (0)