2022-12-28 23:11:57 +08:00
|
|
|
import nodeLogo from "./assets/node.svg"
|
2022-06-05 08:32:53 +08:00
|
|
|
import { useState } from 'react'
|
2022-12-22 11:31:38 +08:00
|
|
|
import './App.scss'
|
2022-06-05 08:32:53 +08:00
|
|
|
|
2022-12-22 11:31:38 +08:00
|
|
|
console.log('[App.tsx]', `Hello world from Electron ${process.versions.electron}!`)
|
|
|
|
|
|
|
|
function App() {
|
2022-06-05 08:32:53 +08:00
|
|
|
const [count, setCount] = useState(0)
|
|
|
|
|
|
|
|
return (
|
2022-12-22 11:31:38 +08:00
|
|
|
<div className="App">
|
|
|
|
<div>
|
2022-12-28 23:11:57 +08:00
|
|
|
<a href="https://github.com/electron-vite/electron-vite-react" target="_blank">
|
2022-12-29 12:17:08 +08:00
|
|
|
<img src="./electron-vite.svg" className="logo" alt="Electron + Vite logo" />
|
2022-12-28 23:11:57 +08:00
|
|
|
</a>
|
2022-12-22 11:31:38 +08:00
|
|
|
</div>
|
|
|
|
<h1>Electron + Vite + React</h1>
|
|
|
|
<div className="card">
|
|
|
|
<button onClick={() => setCount((count) => count + 1)}>
|
|
|
|
count is {count}
|
|
|
|
</button>
|
2022-06-05 08:32:53 +08:00
|
|
|
<p>
|
2022-12-22 11:31:38 +08:00
|
|
|
Edit <code>src/App.tsx</code> and save to test HMR
|
2022-06-05 08:32:53 +08:00
|
|
|
</p>
|
2022-12-22 11:31:38 +08:00
|
|
|
</div>
|
|
|
|
<p className="read-the-docs">
|
2022-12-28 23:11:57 +08:00
|
|
|
Click on the Electron + Vite logo to learn more
|
2022-12-22 11:31:38 +08:00
|
|
|
</p>
|
|
|
|
<div className="flex-center">
|
2022-12-28 23:11:57 +08:00
|
|
|
Place static files into the<code>/public</code> folder <img style={{ width: "5em" }} src={nodeLogo} alt="Node logo" />
|
2022-12-22 11:31:38 +08:00
|
|
|
</div>
|
2022-06-05 08:32:53 +08:00
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default App
|