cubetiq-muui/src/App.tsx

23 lines
434 B
TypeScript
Raw Permalink Normal View History

2022-05-17 08:17:39 +07:00
import { useState } from "react";
import "./App.css";
2022-05-17 09:05:18 +07:00
import Button from "./lib/button";
2022-05-17 08:17:39 +07:00
function App() {
const [count, setCount] = useState<number>(0);
const onCount = (e: any) => {
setCount(count + 1);
};
return (
<div className="App">
<header className="App-header">
<h1>Count: {count}</h1>
<Button onClick={onCount}>Click me</Button>
</header>
</div>
);
}
export default App;