Skip to content

Instantly share code, notes, and snippets.

@morintd

morintd/home.tsx Secret

Created March 11, 2024 19:57
Show Gist options
  • Save morintd/1be61138beea289d1a471f78288c0962 to your computer and use it in GitHub Desktop.
Save morintd/1be61138beea289d1a471f78288c0962 to your computer and use it in GitHub Desktop.
import { Game } from "./game";
import { useHomeController } from "./home-controller";
export function Home() {
const controller = useHomeController();
if (controller.initialize.isPending) {
return <div>Loading</div>;
}
if (controller.initialize.isSuccess) {
return <Game game={controller.initialize.data!} />;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment