diff options
Diffstat (limited to 'examples/framework-multiple/src/components/SolidCounter.tsx')
-rw-r--r-- | examples/framework-multiple/src/components/SolidCounter.tsx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/examples/framework-multiple/src/components/SolidCounter.tsx b/examples/framework-multiple/src/components/SolidCounter.tsx index 63fe5cb11..b16a463d5 100644 --- a/examples/framework-multiple/src/components/SolidCounter.tsx +++ b/examples/framework-multiple/src/components/SolidCounter.tsx @@ -2,18 +2,18 @@ import { createSignal } from 'solid-js'; /** a counter written with Solid */ export default function SolidCounter({ children }) { - const [count, setCount] = createSignal(0); - const add = () => setCount(count() + 1); - const subtract = () => setCount(count() - 1); + const [count, setCount] = createSignal(0); + const add = () => setCount(count() + 1); + const subtract = () => setCount(count() - 1); - return ( - <> - <div id="solid" class="counter"> - <button onClick={subtract}>-</button> - <pre>{count()}</pre> - <button onClick={add}>+</button> - </div> - <div class="counter-message">{children}</div> - </> - ); + return ( + <> + <div id="solid" class="counter"> + <button onClick={subtract}>-</button> + <pre>{count()}</pre> + <button onClick={add}>+</button> + </div> + <div class="counter-message">{children}</div> + </> + ); } |