summaryrefslogtreecommitdiff
path: root/examples/framework-preact/src/components/Counter.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'examples/framework-preact/src/components/Counter.tsx')
-rw-r--r--examples/framework-preact/src/components/Counter.tsx26
1 files changed, 13 insertions, 13 deletions
diff --git a/examples/framework-preact/src/components/Counter.tsx b/examples/framework-preact/src/components/Counter.tsx
index a2ed0277d..61a9f9d5a 100644
--- a/examples/framework-preact/src/components/Counter.tsx
+++ b/examples/framework-preact/src/components/Counter.tsx
@@ -3,18 +3,18 @@ import { useState } from 'preact/hooks';
import './Counter.css';
export default function Counter({ children }) {
- const [count, setCount] = useState(0);
- const add = () => setCount((i) => i + 1);
- const subtract = () => setCount((i) => i - 1);
+ const [count, setCount] = useState(0);
+ const add = () => setCount((i) => i + 1);
+ const subtract = () => setCount((i) => i - 1);
- return (
- <>
- <div class="counter">
- <button onClick={subtract}>-</button>
- <pre>{count}</pre>
- <button onClick={add}>+</button>
- </div>
- <div class="counter-message">{children}</div>
- </>
- );
+ return (
+ <>
+ <div class="counter">
+ <button onClick={subtract}>-</button>
+ <pre>{count}</pre>
+ <button onClick={add}>+</button>
+ </div>
+ <div class="counter-message">{children}</div>
+ </>
+ );
}