This commit is contained in:
miqlangelo 2025-05-06 13:07:37 +02:00
parent 83882ded95
commit 715820b812
3 changed files with 17 additions and 2 deletions

3
.gitignore vendored
View File

@ -1 +1,2 @@
**/node_modules
**/node_modules
**/dist

View File

@ -0,0 +1,7 @@
function add(a: number, b: number) {
const c = a + b;
console.log(c);
return c;
}
add(2, 3);

View File

@ -2,13 +2,20 @@ import './App.css';
import Button from './components/Button';
function App() {
const handleClick = () => {
const a = 1;
const b = 2;
const c = a + b;
console.log(c);
};
return (
<>
<div>
<h1>Hello Typescript with React and Vite</h1>
<Button
label="Click me"
onClick={() => alert('Button clicked!')}
onClick={handleClick}
/>
</div>
</>