update
This commit is contained in:
parent
83882ded95
commit
715820b812
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,2 @@
|
||||
**/node_modules
|
||||
**/node_modules
|
||||
**/dist
|
||||
7
src/06-compiler/debug-demo/index.ts
Normal file
7
src/06-compiler/debug-demo/index.ts
Normal file
@ -0,0 +1,7 @@
|
||||
function add(a: number, b: number) {
|
||||
const c = a + b;
|
||||
console.log(c);
|
||||
return c;
|
||||
}
|
||||
|
||||
add(2, 3);
|
||||
@ -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>
|
||||
</>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user