import { useEffect, useState, memo, useMemo, useCallback } from "https://esm.sh/react";
import ReactDOM from "https://esm.sh/react-dom";
function App() {
const [data, setData] = useState("I'm a data.");
console.log(1);
console.log('render data', data);
useEffect(() => {
console.log(3);
console.log('useEffect data', data);
}, []);
setTimeout(() => {
console.log(2);
setData('I changed!');
}, 0);
return (
<>
<div>{data}</div>
</>)
}
ReactDOM.render(<App />, document.querySelector("#app"));
View Compiled