File size: 568 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
"use client";
import { jsx as _jsx } from "https://esm.sh/preact/jsx-runtime";
import { useMemo } from "react";
import { fooBar } from "./external";
/** Add your relevant code here for the issue to reproduce */ export default function Home() {
const helloWorld = useMemo(()=>new HelloWorld(), []);
return /*#__PURE__*/ _jsx("button", {
onClick: ()=>helloWorld.hi(),
children: "Click me"
});
}
class HelloWorld {
hi() {
this.#wrap(()=>{
alert(fooBar());
});
}
#wrap(cb) {
return cb();
}
}
|