Initialize web application via create-cloudflare CLI
Details: C3 = create-cloudflare@2.62.0 project name = anum-frontend framework = react-router framework cli = create-react-router@7.9.6 package manager = pnpm@10.26.1 wrangler = wrangler@4.57.0 git = 2.52.0
This commit is contained in:
commit
475596444a
21 changed files with 3292 additions and 0 deletions
17
app/routes/home.tsx
Normal file
17
app/routes/home.tsx
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import type { Route } from "./+types/home";
|
||||
import { Welcome } from "../welcome/welcome";
|
||||
|
||||
export function meta({}: Route.MetaArgs) {
|
||||
return [
|
||||
{ title: "New React Router App" },
|
||||
{ name: "description", content: "Welcome to React Router!" },
|
||||
];
|
||||
}
|
||||
|
||||
export function loader({ context }: Route.LoaderArgs) {
|
||||
return { message: context.cloudflare.env.VALUE_FROM_CLOUDFLARE };
|
||||
}
|
||||
|
||||
export default function Home({ loaderData }: Route.ComponentProps) {
|
||||
return <Welcome message={loaderData.message} />;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue