Skip to main content

JSX

JSX is short for something it doesn't matter.

It looks like this:

function sayHi() { alert("hi") }

function CoolButton() {
	return <button onClick={sayHi}>Click me</button>
}

function render() {
	// some goofy JavaScript doing important things...
	return <CoolButton />
}

So it's like JavaScript with HTML inside it, and you can define new HTML tags.

JSX is not React and React is not JSX.

You might want to try web components instead.