aboutsummaryrefslogtreecommitdiff
path: root/examples/framework-react/src/pages/index.astro
diff options
context:
space:
mode:
Diffstat (limited to 'examples/framework-react/src/pages/index.astro')
-rw-r--r--examples/framework-react/src/pages/index.astro36
1 files changed, 36 insertions, 0 deletions
diff --git a/examples/framework-react/src/pages/index.astro b/examples/framework-react/src/pages/index.astro
new file mode 100644
index 000000000..5bc1f8d36
--- /dev/null
+++ b/examples/framework-react/src/pages/index.astro
@@ -0,0 +1,36 @@
+---
+// Component Imports
+import Counter from '../components/Counter';
+const someProps = {
+ count: 0,
+};
+
+// Full Astro Component Syntax:
+// https://docs.astro.build/basics/astro-components/
+---
+
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width" />
+ <meta name="generator" content={Astro.generator} />
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
+ <style>
+ html,
+ body {
+ font-family: system-ui;
+ margin: 0;
+ }
+ body {
+ padding: 2rem;
+ }
+ </style>
+ </head>
+ <body>
+ <main>
+ <Counter {...someProps} client:visible>
+ <h1>Hello, React!</h1>
+ </Counter>
+ </main>
+ </body>
+</html>