diff options
Diffstat (limited to 'examples/framework-multiple/src/components/preact/PreactCounter.tsx')
-rw-r--r-- | examples/framework-multiple/src/components/preact/PreactCounter.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/framework-multiple/src/components/preact/PreactCounter.tsx b/examples/framework-multiple/src/components/preact/PreactCounter.tsx index 2fb0a54b9..5ad164cc2 100644 --- a/examples/framework-multiple/src/components/preact/PreactCounter.tsx +++ b/examples/framework-multiple/src/components/preact/PreactCounter.tsx @@ -1,9 +1,10 @@ /** @jsxImportSource preact */ import { useState } from 'preact/hooks'; +import type { ComponentChildren } from 'preact'; /** A counter written with Preact */ -export function PreactCounter({ children }) { +export function PreactCounter({ children }: { children?: ComponentChildren }) { const [count, setCount] = useState(0); const add = () => setCount((i) => i + 1); const subtract = () => setCount((i) => i - 1); |