wip: first commit
This commit is contained in:
commit
98448060b9
24 changed files with 709 additions and 0 deletions
43
vite-project/src/app.tsx
Normal file
43
vite-project/src/app.tsx
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
import { useState } from 'preact/hooks'
|
||||
import preactLogo from './assets/preact.svg'
|
||||
import viteLogo from '/vite.svg'
|
||||
import './app.css'
|
||||
|
||||
export function App() {
|
||||
const [count, setCount] = useState(0)
|
||||
|
||||
return (
|
||||
<>
|
||||
<div>
|
||||
<a href="https://vite.dev" target="_blank">
|
||||
<img src={viteLogo} class="logo" alt="Vite logo" />
|
||||
</a>
|
||||
<a href="https://preactjs.com" target="_blank">
|
||||
<img src={preactLogo} class="logo preact" alt="Preact logo" />
|
||||
</a>
|
||||
</div>
|
||||
<h1>Vite + Preact</h1>
|
||||
<div class="card">
|
||||
<button onClick={() => setCount((count) => count + 1)}>
|
||||
count is {count}
|
||||
</button>
|
||||
<p>
|
||||
Edit <code>src/app.tsx</code> and save to test HMR
|
||||
</p>
|
||||
</div>
|
||||
<p>
|
||||
Check out{' '}
|
||||
<a
|
||||
href="https://preactjs.com/guide/v10/getting-started#create-a-vite-powered-preact-app"
|
||||
target="_blank"
|
||||
>
|
||||
create-preact
|
||||
</a>
|
||||
, the official Preact + Vite starter
|
||||
</p>
|
||||
<p class="read-the-docs">
|
||||
Click on the Vite and Preact logos to learn more
|
||||
</p>
|
||||
</>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue