Skip to content

Commit

Permalink
feat(web): add reset button
Browse files Browse the repository at this point in the history
  • Loading branch information
spicyzboss committed Jan 3, 2024
1 parent ffeff3c commit c1cb7b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/web/src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default component$(() => {
const count = useSignal(0);

const increment = $(() => count.value++);
const reset = $(() => count.value = 0);

return (
<>
Expand All @@ -16,6 +17,7 @@ export default component$(() => {
</Typography>
<Button onClick$={increment}>Increment</Button>
<Typography>คุณคลิ๊กไป {count} ครั้ง</Typography>
<Button onClick$={reset}>Reset</Button>
</div>
</>
);
Expand Down

0 comments on commit c1cb7b4

Please sign in to comment.