mirror of
https://github.com/oven-sh/bun
synced 2026-02-12 11:59:00 +00:00
* fix a few ipc issues * a * my own revisions * remove none as a valid type * a * fix windows build * remove comment * make it work !!!!!!!! * a * formatter nonsense * blah * huge update refactor * awa * wow * okay
28 lines
523 B
Plaintext
28 lines
523 B
Plaintext
import { useState } from "react";
|
|
|
|
export function Counter() {
|
|
console.log('counter b loaded');
|
|
|
|
const [count, setCount] = useState(0);
|
|
|
|
function increment() {
|
|
setCount(count + 2);
|
|
}
|
|
|
|
function decrement() {
|
|
setCount(count - 2);
|
|
}
|
|
|
|
return (
|
|
<div id="counter-fixture" className="rounded-br-full">
|
|
<p>Count B: {count}</p>
|
|
<button className="inc" onClick={increment}>
|
|
+
|
|
</button>
|
|
<button className="dec" onClick={decrement}>
|
|
-
|
|
</button>
|
|
</div>
|
|
);
|
|
}
|