summaryrefslogtreecommitdiff
path: root/examples/framework-react/src/pages/index.astro
blob: dd295078227d220c068945a316b71cef49f93023 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
// Component Imports
import Counter from '../components/Counter.jsx'
const someProps = {
  count: 0,
}

// Full Astro Component Syntax:
// https://docs.astro.build/core-concepts/astro-components/
---
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <link rel="icon" type="image/x-icon" href="/favicon.ico" />
    <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>