Here is a simple program coded using REACT features in Codepen with the help of external react libraries and Codepen’s Babel Transpiler.
HTML
JS (Babel)
import React, { useState, useRef, useEffect } from 'https://esm.sh/[email protected]'
import ReactDOM from 'https://esm.sh/[email protected]'
const App = () => {
const [count, setCount] = useState(0);
return(
<div className="box">
<h1>Count: {count}</h1>
</div>
);
}
ReactDOM.render(<App/>, document.getElementById("root"))
DEMO
See the Pen React Starter Template with Babel Transpiler by Puneet Sharma (@webdevpuneet) on CodePen.