This commit removes the need for users to specify a --config file. TS libs are now configured via `/// <reference>` directives, and the JSX transform is specified via the `/** @jsx h */` pragma. The future is configless!
18 lines
395 B
TypeScript
18 lines
395 B
TypeScript
/** @jsx h */
|
|
|
|
import { h, IS_BROWSER, useData } from "../deps.ts";
|
|
|
|
export default function Home() {
|
|
const message = useData("home", (key) => {
|
|
return new Promise<string>((resolve) => {
|
|
setTimeout(() => resolve("Hello!"), 100);
|
|
});
|
|
});
|
|
return (
|
|
<div>
|
|
<p>{message}</p>
|
|
<p>{IS_BROWSER ? "Viewing browser render." : "Viewing JIT render."}</p>
|
|
</div>
|
|
);
|
|
}
|