14 lines
369 B
TypeScript
Raw Normal View History

2025-01-05 23:55:22 -05:00
import { useState } from "react";
2025-01-07 22:25:44 -08:00
import { cards } from "../cards.ts";
2024-12-29 23:00:38 -05:00
import { Card } from "./Card.tsx";
export const App = () => {
2025-01-05 23:55:22 -05:00
const [count, setCount] = useState(0);
2025-01-06 22:28:57 -05:00
return <div>
2025-01-07 22:25:44 -08:00
{cards.map((card) => {
return <Card key={`${card.title}-${count}`} card={card}/>
2025-01-07 08:10:47 -08:00
})}
2025-01-06 22:28:57 -05:00
<button onClick={() => {setCount(c => c+1)}}>Rerender (for fonts)</button>
</div>;
2024-12-29 23:00:38 -05:00
};