<div id="app"></div>
import { useEffect, useState } from "https://esm.sh/react";
import ReactDOM from "https://esm.sh/react-dom";
function App() {
const [count, setCount] = useState(0);
const handleClickEvent = () => {
setCount(prev => prev + 1)
};
return (<div>
<h1>{ count }</h1>
<button onClick={handleClickEvent}>add count</button>
</div>)
}
ReactDOM.render(<App />, document.querySelector("#app"));
View Compiled
This Pen doesn't use any external CSS resources.