Skip to content

Instantly share code, notes, and snippets.

@tom-sherman
Created June 19, 2023 18:53
Show Gist options
  • Save tom-sherman/a42edfdeffaf33a1483a4b90068585ad to your computer and use it in GitHub Desktop.
Save tom-sherman/a42edfdeffaf33a1483a4b90068585ad to your computer and use it in GitHub Desktop.
export function Layout({ children }: { children: React.ReactNode }) {
return (
<html>
<body>
{children}
</body>
</html>
);
}
export async function Page() {
const time = await fetch("https://...").then(r => r.text());
return <p>The current time is: {time}</p>;
}
import { start } from "php.js";
start({ root: "./layout.tsx" });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment