0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-02-24 22:46:02 -05:00

Fix react example type

This commit is contained in:
bluwy 2025-01-07 17:41:23 +08:00
parent 2f7cd47383
commit 4e31dc9d6a

View file

@ -1,11 +1,11 @@
import { useState } from 'react'; import { useState, type ReactNode } from 'react';
import './Counter.css'; import './Counter.css';
export default function Counter({ export default function Counter({
children, children,
count: initialCount, count: initialCount,
}: { }: {
children: JSX.Element; children: ReactNode;
count: number; count: number;
}) { }) {
const [count, setCount] = useState(initialCount); const [count, setCount] = useState(initialCount);